aboutsummaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorNils Durner <durner@gnunet.org>2009-06-11 13:39:32 +0000
committerNils Durner <durner@gnunet.org>2009-06-11 13:39:32 +0000
commit4dcecfd72005cc8f990dea5fca456da54a6eaa98 (patch)
tree410234c02cae025f3364dce5bc0dba5735d74bb2 /src/include
parentba96830423bfa01596be48f9c9326229a1fc802a (diff)
downloadgnunet-4dcecfd72005cc8f990dea5fca456da54a6eaa98.tar.gz
gnunet-4dcecfd72005cc8f990dea5fca456da54a6eaa98.zip
poll PIDs for status information
Diffstat (limited to 'src/include')
-rw-r--r--src/include/gnunet_os_lib.h30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h
index dfab4a747..8e48a049c 100644
--- a/src/include/gnunet_os_lib.h
+++ b/src/include/gnunet_os_lib.h
@@ -60,6 +60,19 @@ enum GNUNET_OS_InstallationPathKind
60 60
61 61
62/** 62/**
63 * Process status types
64 */
65enum GNUNET_OS_ProcessStatusType
66{
67 GNUNET_OS_PROCESS_UNKNOWN,
68 GNUNET_OS_PROCESS_RUNNING,
69 GNUNET_OS_PROCESS_STOPPED,
70 GNUNET_OS_PROCESS_EXITED,
71 GNUNET_OS_PROCESS_SIGNALED
72};
73
74
75/**
63 * Get the path to a specific GNUnet installation directory or, with 76 * Get the path to a specific GNUnet installation directory or, with
64 * GNUNET_OS_IPK_SELF_PREFIX, the current running apps installation 77 * GNUNET_OS_IPK_SELF_PREFIX, the current running apps installation
65 * directory. 78 * directory.
@@ -145,6 +158,23 @@ pid_t GNUNET_OS_start_process (const char *filename, ...);
145 */ 158 */
146pid_t GNUNET_OS_start_process_v (const char *filename, char *const argv[]); 159pid_t GNUNET_OS_start_process_v (const char *filename, char *const argv[]);
147 160
161/**
162 * Retrieve the status of a process
163 * @param proc process ID
164 * @param type status type
165 * @param code return code/signal number
166 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
167 */
168int GNUNET_OS_process_status (pid_t proc, enum GNUNET_OS_ProcessStatusType *type,
169 unsigned long *code);
170
171/**
172 * Wait for a process
173 * @param proc process ID to wait for
174 * @return GNUNET_OK on success, GNUNET_SYSERR otherwise
175 */
176int GNUNET_OS_process_wait (pid_t proc);
177
148#if 0 /* keep Emacsens' auto-indent happy */ 178#if 0 /* keep Emacsens' auto-indent happy */
149{ 179{
150#endif 180#endif