diff options
Diffstat (limited to 'src/sysexec.c')
-rw-r--r-- | src/sysexec.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/sysexec.c b/src/sysexec.c index 2ef1d50..5cedbf7 100644 --- a/src/sysexec.c +++ b/src/sysexec.c @@ -65,9 +65,9 @@ int uanytun_exec(const char* script, char* const argv[], char* const evp[]) log_printf(WARNING, "can't open stderr"); } execve(script, argv, evp); - // if execl return, an error occurred - log_printf(ERROR, "error on executing script: %s", strerror(errno)); - return -1; + // if execve returns, an error occurred, but logging doesn't work + // because we closed all file descriptors, so just call exit + exit(-1); } int status = 0; waitpid(pid, &status, 0); |