diff options
author | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-27 17:36:07 +0000 |
---|---|---|
committer | russell <russell@f38db490-d61c-443f-a65b-d21fe96a405b> | 2006-10-27 17:36:07 +0000 |
commit | 8cae630bdc7f5d0a9919c7f1c0291ef75cb6a6cc (patch) | |
tree | 5db183ccdd3857cda5e7d8161153b0d09e6d3d1d /res/res_musiconhold.c | |
parent | 7c6569f513344bcdc27de007b73fefbb62bc6cf1 (diff) |
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: http://svn.digium.com/svn/asterisk/branches/1.2@46361 f38db490-d61c-443f-a65b-d21fe96a405b
Diffstat (limited to 'res/res_musiconhold.c')
-rw-r--r-- | res/res_musiconhold.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/res/res_musiconhold.c b/res/res_musiconhold.c index b005cd765..9972889f8 100644 --- a/res/res_musiconhold.c +++ b/res/res_musiconhold.c @@ -463,7 +463,7 @@ static int spawn_mp3(struct mohclass *class) } ast_log(LOG_WARNING, "Exec failed: %s\n", strerror(errno)); close(fds[1]); - exit(1); + _exit(1); } else { /* Parent */ close(fds[1]); |