diff options
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/gnunet_os_lib.h | 17 | ||||
-rw-r--r-- | src/include/gnunet_scheduler_lib.h | 22 |
2 files changed, 29 insertions, 10 deletions
diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h index 328f20c35..48027e922 100644 --- a/src/include/gnunet_os_lib.h +++ b/src/include/gnunet_os_lib.h | |||
@@ -313,7 +313,8 @@ GNUNET_OS_command_run (GNUNET_OS_LineProcessor proc, | |||
313 | 313 | ||
314 | 314 | ||
315 | /** | 315 | /** |
316 | * Retrieve the status of a process | 316 | * Retrieve the status of a process. Nonblocking version. |
317 | * | ||
317 | * @param proc pointer to process structure | 318 | * @param proc pointer to process structure |
318 | * @param type status type | 319 | * @param type status type |
319 | * @param code return code/signal number | 320 | * @param code return code/signal number |
@@ -324,7 +325,12 @@ int GNUNET_OS_process_status (struct GNUNET_OS_Process *proc, | |||
324 | 325 | ||
325 | 326 | ||
326 | /** | 327 | /** |
327 | * Wait for a process | 328 | * Wait for a process to terminate. The return code is discarded. |
329 | * You must not use 'GNUNET_OS_process_status' on the same process | ||
330 | * after calling this function! This function is blocking and should | ||
331 | * thus only be used if the child process is known to have terminated | ||
332 | * or to terminate very soon. | ||
333 | * | ||
328 | * @param proc pointer to process structure of the process to wait for | 334 | * @param proc pointer to process structure of the process to wait for |
329 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise | 335 | * @return GNUNET_OK on success, GNUNET_SYSERR otherwise |
330 | */ | 336 | */ |
@@ -339,13 +345,6 @@ GNUNET_OS_install_parent_control_handler (void *cls, | |||
339 | const struct | 345 | const struct |
340 | GNUNET_SCHEDULER_TaskContext * tc); | 346 | GNUNET_SCHEDULER_TaskContext * tc); |
341 | 347 | ||
342 | /** | ||
343 | * Called everty time the parent process sends a signal | ||
344 | */ | ||
345 | void | ||
346 | parent_control_handler (void *cls, | ||
347 | const struct | ||
348 | GNUNET_SCHEDULER_TaskContext * tc); | ||
349 | 348 | ||
350 | /** | 349 | /** |
351 | * Check whether an executable exists and possibly | 350 | * Check whether an executable exists and possibly |
diff --git a/src/include/gnunet_scheduler_lib.h b/src/include/gnunet_scheduler_lib.h index 774f2f4bc..ce3261f0a 100644 --- a/src/include/gnunet_scheduler_lib.h +++ b/src/include/gnunet_scheduler_lib.h | |||
@@ -1,6 +1,6 @@ | |||
1 | /* | 1 | /* |
2 | This file is part of GNUnet | 2 | This file is part of GNUnet |
3 | (C) 2009 Christian Grothoff (and other contributing authors) | 3 | (C) 2009, 2011 Christian Grothoff (and other contributing authors) |
4 | 4 | ||
5 | GNUnet is free software; you can redistribute it and/or modify | 5 | GNUnet is free software; you can redistribute it and/or modify |
6 | it under the terms of the GNU General Public License as published | 6 | it under the terms of the GNU General Public License as published |
@@ -323,6 +323,26 @@ GNUNET_SCHEDULER_add_now (GNUNET_SCHEDULER_Task task, | |||
323 | 323 | ||
324 | 324 | ||
325 | /** | 325 | /** |
326 | * Schedule a new task to be run as soon as possible with the | ||
327 | * (transitive) ignore-shutdown flag either explicitly set or | ||
328 | * explicitly enabled. This task (and all tasks created from it, | ||
329 | * other than by another call to this function) will either count or | ||
330 | * not count for the 'lifeness' of the process. This API is only | ||
331 | * useful in a few special cases. | ||
332 | * | ||
333 | * @param lifeness GNUNET_YES if the task counts for lifeness, GNUNET_NO if not. | ||
334 | * @param task main function of the task | ||
335 | * @param task_cls closure of task | ||
336 | * @return unique task identifier for the job | ||
337 | * only valid until "task" is started! | ||
338 | */ | ||
339 | GNUNET_SCHEDULER_TaskIdentifier | ||
340 | GNUNET_SCHEDULER_add_now_with_lifeness (int lifeness, | ||
341 | GNUNET_SCHEDULER_Task task, | ||
342 | void *task_cls); | ||
343 | |||
344 | |||
345 | /** | ||
326 | * Schedule a new task to be run with a specified delay. The task | 346 | * Schedule a new task to be run with a specified delay. The task |
327 | * will be scheduled for execution once the delay has expired. It | 347 | * will be scheduled for execution once the delay has expired. It |
328 | * will be run with the priority of the calling task. | 348 | * will be run with the priority of the calling task. |