summaryrefslogtreecommitdiff
path: root/asterisk.c
diff options
context:
space:
mode:
Diffstat (limited to 'asterisk.c')
-rwxr-xr-xasterisk.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/asterisk.c b/asterisk.c
index 5e1d81215..a714d542b 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);