lib/util_runcmd: make use of double_fork() to avoid SIGCHLD problems. master4-double-fork
authorStefan Metzmacher <metze@samba.org>
Tue, 26 Oct 2010 22:39:37 +0000 (00:39 +0200)
committerStefan Metzmacher <metze@samba.org>
Wed, 27 Oct 2010 07:33:37 +0000 (09:33 +0200)
metze

lib/util/util_runcmd.c

index aa2a3e66727989e2d59227b51ad036243b81a82d..3bf4bc6a97ff45a80b343f9260ddd6cea2c64f44 100644 (file)
@@ -102,7 +102,7 @@ struct tevent_req *samba_runcmd_send(TALLOC_CTX *mem_ctx,
                return tevent_req_post(req, ev);
        }
 
-       state->pid = fork();
+       state->pid = double_fork(NULL);
        if (state->pid == (pid_t)-1) {
                close(p1[0]);
                close(p1[1]);