summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/common/compat.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/common/compat.c b/src/common/compat.c
index 0b5de082cc..ae1b58653a 100644
--- a/src/common/compat.c
+++ b/src/common/compat.c
@@ -678,7 +678,9 @@ void spawn_exit()
#elif defined(USE_PTHREADS)
pthread_exit(NULL);
#else
- exit(0);
+ /* http://www.erlenstar.demon.co.uk/unix/faq_2.html says we should
+ * call _exit, not exit, from child processes. */
+ _exit(0);
#endif
}