Skip to content

Commit

Permalink
Log execv error
Browse files Browse the repository at this point in the history
  • Loading branch information
iamluc committed Dec 5, 2024
1 parent 00d1327 commit ec7518a
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion loader/dd_library_loader.c
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
#include <php.h>
#include <php_ini.h>
#include <stdbool.h>
#include <errno.h>
#include <main/SAPI.h>
#include <ext/standard/basic_functions.h>

Expand Down Expand Up @@ -318,9 +319,10 @@ static void ddloader_telemetryf(telemetry_reason reason, const char *format, ...
char *argv[] = {telemetry_forwarder_path, "library_entrypoint", payload, NULL};

execv(telemetry_forwarder_path, argv);
LOG(ERROR, "Telemetry: cannot execv: %s", strerror(errno))

// If execv failed, exit immediately
LOG(ERROR, "Telemetry: cannot execv")
// Return 127 for the most likely case of a missing file
exit(127);
}

Expand Down

0 comments on commit ec7518a

Please sign in to comment.