diff --git a/asterisk.c b/asterisk.c index 5e1d812153fb3f2b36b7359440764ff493a7ebc3..a714d542b71f2f841e402dd17cd8c65f6dd0bcab 100755 --- a/asterisk.c +++ b/asterisk.c @@ -168,8 +168,8 @@ int ast_safe_system(const char *s) for (x=STDERR_FILENO + 1; x<4096;x++) { close(x); } - res = system(s); - exit(res); + res = execl("/bin/sh", "/bin/sh", "-c", s, NULL); + exit(1); } else if (pid > 0) { for(;;) { res = wait4(pid, &status, 0, &rusage);