projects
/
asterisk/asterisk.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a05ef35
)
Improve ast_safe_system
author
Mark Spencer
<markster@digium.com>
Tue, 23 Mar 2004 21:55:46 +0000
(21:55 +0000)
committer
Mark Spencer
<markster@digium.com>
Tue, 23 Mar 2004 21:55:46 +0000
(21:55 +0000)
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@2541
65c4cc65
-6c06-0410-ace0-
fbb531ad65f3
asterisk.c
patch
|
blob
|
history
diff --git
a/asterisk.c
b/asterisk.c
index
5e1d812
..
a714d54
100755
(executable)
--- 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);