diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2011-03-09 18:21:10 +0100 |
---|---|---|
committer | Anthony Liguori <aliguori@us.ibm.com> | 2011-03-29 08:14:11 -0500 |
commit | a048bb6e4de6b6f52589fb223afd26a17ca305df (patch) | |
tree | e96c20c18a4ef32efe87295a70d17316757832cb /os-posix.c | |
parent | 9124a5cbe12b0733ce8f17726e7bbfb118d0d9f9 (diff) | |
download | qemu-a048bb6e4de6b6f52589fb223afd26a17ca305df.tar.gz qemu-a048bb6e4de6b6f52589fb223afd26a17ca305df.tar.bz2 qemu-a048bb6e4de6b6f52589fb223afd26a17ca305df.zip |
add a service to reap zombies, use it in SLIRP
SLIRP -smb support wants to fork a process and forget about reaping it.
To please it, add a generic service to register a process id and let
QEMU reap it. In the future it could be enhanced to pass a status,
but this would be unused.
With this in place, the SIGCHLD signal handler would not stomp on pclose
anymore.
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
Diffstat (limited to 'os-posix.c')
-rw-r--r-- | os-posix.c | 9 |
1 files changed, 0 insertions, 9 deletions
diff --git a/os-posix.c b/os-posix.c index eb49e2f177..320419793a 100644 --- a/os-posix.c +++ b/os-posix.c @@ -67,11 +67,6 @@ static void termsig_handler(int signal, siginfo_t *info, void *c) qemu_system_killed(info->si_signo, info->si_pid); } -static void sigchld_handler(int signal) -{ - waitpid(-1, NULL, WNOHANG); -} - void os_setup_signal_handling(void) { struct sigaction act; @@ -82,10 +77,6 @@ void os_setup_signal_handling(void) sigaction(SIGINT, &act, NULL); sigaction(SIGHUP, &act, NULL); sigaction(SIGTERM, &act, NULL); - - act.sa_handler = sigchld_handler; - act.sa_flags = SA_NOCLDSTOP; - sigaction(SIGCHLD, &act, NULL); } /* Find a likely location for support files using the location of the binary. |