We should be using wait_process(), not waitpid() directly.
authorWayne Davison <wayned@samba.org>
Wed, 1 Feb 2006 19:25:34 +0000 (19:25 +0000)
committerWayne Davison <wayned@samba.org>
Wed, 1 Feb 2006 19:25:34 +0000 (19:25 +0000)
cleanup.c

index b1bf256..0163dd2 100644 (file)
--- a/cleanup.c
+++ b/cleanup.c
@@ -104,7 +104,8 @@ void _exit_cleanup(int code, const char *file, int line)
 
        if (cleanup_child_pid != -1) {
                int status;
-               if (waitpid(cleanup_child_pid, &status, WNOHANG) == cleanup_child_pid) {
+               if (wait_process(cleanup_child_pid, &status, WNOHANG)
+                == cleanup_child_pid) {
                        status = WEXITSTATUS(status);
                        if (status > code)
                                code = status;