aboutsummaryrefslogtreecommitdiffhomepage
path: root/postfork.h
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-28 15:11:46 -0800
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2012-02-29 16:14:51 -0800
commit909d24cde6acf87587370355d7a9cbc7dc18435c (patch)
treee859cfa7d3d39998affe6ce42bb44d47977a804b /postfork.h
parent4e912ef83df234d34fff4156cd2bfb165e113674 (diff)
More work on improving interaction between fork and pthreads. Added null_terminated_array_t class.
Diffstat (limited to 'postfork.h')
-rw-r--r--postfork.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/postfork.h b/postfork.h
index 9eaf06e2..06364b31 100644
--- a/postfork.h
+++ b/postfork.h
@@ -23,4 +23,8 @@
int set_child_group( job_t *j, process_t *p, int print_errors );
int setup_child_process( job_t *j, process_t *p );
+/* Call fork(), optionally waiting until we are no longer multithreaded. If the forked child doesn't do anything that could allocate memory, take a lock, etc. (like call exec), then it's not necessary to wait for threads to die. If the forked child may do those things, it should wait for threads to die.
+*/
+pid_t execute_fork(bool wait_for_threads_to_die);
+
#endif