Skip to content

Commit

Permalink
Disable SIGSEGV signal handler and crashtracker when sapi is FrankenP…
Browse files Browse the repository at this point in the history
…HP (#2819)

* Disable crashtracker on FrankenPHP

* Disable sigsegv handler on FrankenPHP

* Disable unecessary 'wait_for_receiver'
  • Loading branch information
iamluc authored Aug 29, 2024
1 parent 1ae62ef commit fca0ec2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ext/signals.c
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ static void ddtrace_init_crashtracker() {
.endpoint = agent_endpoint,
.timeout_secs = 5,
.resolve_frames = DDOG_CRASHT_STACKTRACE_COLLECTION_ENABLED_WITH_INPROCESS_SYMBOLS,
.wait_for_receiver = true
.wait_for_receiver = false
};

ddog_Vec_Tag tags = ddog_Vec_Tag_new();
Expand Down Expand Up @@ -160,7 +160,7 @@ void ddtrace_signals_first_rinit(void) {
* Using an alternate stack allows the handler to run even when the main
* stack overflows.
*/
if (install_handler) {
if (install_handler && ddtrace_active_sapi != DATADOG_PHP_SAPI_FRANKENPHP) {
size_t stack_size = SIGSTKSZ < MIN_STACKSZ ? MIN_STACKSZ : SIGSTKSZ;
if ((ddtrace_altstack.ss_sp = malloc(stack_size))) {
ddtrace_altstack.ss_size = stack_size;
Expand Down

0 comments on commit fca0ec2

Please sign in to comment.