summaryrefslogtreecommitdiffstats
path: root/lib/tdb
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2014-11-26 15:35:19 +0000
committerVolker Lendecke <vl@samba.org>2014-11-26 16:43:04 +0100
commit42b2e5ca8c9b85e6fce71529bef5d6b3ba4f4a38 (patch)
tree57fff0a3843cd892632d9a55853d20a262daded8 /lib/tdb
parentec0c9ad0994d35e22ecc50e552d14582c51622b1 (diff)
downloadsamba-42b2e5ca8c9b85e6fce71529bef5d6b3ba4f4a38.tar.gz
samba-42b2e5ca8c9b85e6fce71529bef5d6b3ba4f4a38.tar.xz
samba-42b2e5ca8c9b85e6fce71529bef5d6b3ba4f4a38.zip
tdb: Fix tdb_runtime_check_for_robust_mutexes()
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>
Diffstat (limited to 'lib/tdb')
-rw-r--r--lib/tdb/common/mutex.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/tdb/common/mutex.c b/lib/tdb/common/mutex.c
index bdc4c28cb6..12f89d3b3d 100644
--- a/lib/tdb/common/mutex.c
+++ b/lib/tdb/common/mutex.c
@@ -814,17 +814,17 @@ _PUBLIC_ bool tdb_runtime_check_for_robust_mutexes(void)
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;