When using exit() instead of _exit(), the child will flush buffered stdout
(and other stdio) content that it inherited from the parent process. In
make test, this led to duplicate output from net registry which then
confused the blackbox selftest.
Signed-off-by: Volker Lendecke <vl@samba.org>
Reviewed-by: Stefan Metzmacher <metze@samba.org>
ret = pthread_mutex_lock(m);
nwritten = write(pipe_up[1], &ret, sizeof(ret));
if (nwritten != sizeof(ret)) {
- exit(1);
+ _exit(1);
}
if (ret != 0) {
- exit(1);
+ _exit(1);
}
nread = read(pipe_down[0], &c, 1);
if (nread != 1) {
- exit(1);
+ _exit(1);
}
/* leave locked */
- exit(0);
+ _exit(0);
}
if (tdb_robust_mutex_pid == -1) {
goto cleanup_sig_child;