lib/util: add tfork()
authorStefan Metzmacher <metze@samba.org>
Thu, 23 Sep 2010 16:10:02 +0000 (18:10 +0200)
committerRalph Boehme <slow@samba.org>
Thu, 20 Apr 2017 14:53:16 +0000 (16:53 +0200)
commit6b950ae37e80eccea7ed0a831497f6c7923f6d03
tree2bbbc74c6acf130043d52f8d2f72fc1ba7fb67a9
parentfef69a132be265398c693183c2cd69b7e5ff6068
lib/util: add tfork()

triple-fork to avoid handling SIGCHLD in the parent.

This function is a workaround for the problem of using fork() in
library code. In that case the library should avoid setting a global
signal handler for SIGCHLD, because the application may wants to use its
own handler.

status_fd can be used to wait for the child to exit and get its exit
status.

Signed-off-by: Ralph Boehme <slow@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
lib/util/tfork.c [new file with mode: 0644]
lib/util/tfork.h [new file with mode: 0644]
lib/util/wscript_build