aboutsummaryrefslogtreecommitdiff
path: root/src/common/util_process.h
diff options
context:
space:
mode:
authorNick Mathewson <nickm@torproject.org>2014-06-14 11:46:38 -0400
committerNick Mathewson <nickm@torproject.org>2014-06-14 11:46:38 -0400
commita7cafb1ea9307864c94ad3e019af93d09d48350e (patch)
tree1c6cc26fb0a93f46d839b3cb46855c93aca135f4 /src/common/util_process.h
parenta58d94fb7c6c304ecba930eaa7ebbade1d0686ab (diff)
parente07d328457b26babe89abdcc1d5a550ee8273462 (diff)
downloadtor-a7cafb1ea9307864c94ad3e019af93d09d48350e.tar
tor-a7cafb1ea9307864c94ad3e019af93d09d48350e.tar.gz
Merge branch 'bug8746_v2_squashed'
Conflicts: src/common/include.am
Diffstat (limited to 'src/common/util_process.h')
-rw-r--r--src/common/util_process.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/common/util_process.h b/src/common/util_process.h
new file mode 100644
index 000000000..877702c68
--- /dev/null
+++ b/src/common/util_process.h
@@ -0,0 +1,25 @@
+/* Copyright (c) 2011-2013, The Tor Project, Inc. */
+/* See LICENSE for licensing information */
+
+/**
+ * \file util_process.h
+ * \brief Headers for util_process.c
+ **/
+
+#ifndef TOR_UTIL_PROCESS_H
+#define TOR_UTIL_PROCESS_H
+
+#ifndef _WIN32
+/** A callback structure waiting for us to get a SIGCHLD informing us that a
+ * PID has been closed. Created by set_waitpid_callback. Cancelled or cleaned-
+ * up from clear_waitpid_callback(). Do not access outside of the main thread;
+ * do not access from inside a signal handler. */
+typedef struct waitpid_callback_t waitpid_callback_t;
+
+waitpid_callback_t *set_waitpid_callback(pid_t pid,
+ void (*fn)(int, void *), void *arg);
+void clear_waitpid_callback(waitpid_callback_t *ent);
+void notify_pending_waitpid_callbacks(void);
+#endif
+
+#endif