瀏覽代碼

http://www.erlenstar.demon.co.uk/unix/faq_2.html says we
should call _exit, not exit, from child processes.


svn:r3506

Roger Dingledine 20 年之前
父節點
當前提交
f3b74a2adb
共有 1 個文件被更改,包括 3 次插入1 次删除
  1. 3 1
      src/common/compat.c

+ 3 - 1
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
 }