From 9103e8e13f7dcfc0177d0202895185b442db8bc3 Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Wed, 24 Jun 2009 01:46:33 +0000 Subject: fixed ifconfig calls for linux and bsd fixed execve error handling --- src/sysexec.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/sysexec.c') 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); -- cgit v1.2.3