Merged revisions 46363 via svnmerge from

https://origsvn.digium.com/svn/asterisk/branches/1.4

........
r46363 | russell | 2006-10-27 12:39:31 -0500 (Fri, 27 Oct 2006) | 5 lines

We should always be using _exit() after a fork() or vfork() instead of exit().
This is because exit() does some extra cleanup which in some implementations
of vfork(), for example, can actually modify the state of the parent process,
causing very weird bugs or crashes.  (issue #7971, Nick Gavrikov)

........


git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@46364 65c4cc65-6c06-0410-ace0-fbb531ad65f3
This commit is contained in:
Russell Bryant
2006-10-27 17:42:57 +00:00
parent 4a523b1b2d
commit 4337a82563
4 changed files with 5 additions and 5 deletions

View File

@@ -668,7 +668,7 @@ int ast_safe_system(const char *s)
close(x);
#endif
execl("/bin/sh", "/bin/sh", "-c", s, (char *) NULL);
exit(1);
_exit(1);
} else if (pid > 0) {
for(;;) {
res = wait4(pid, &status, 0, &rusage);