From: Christian Grothoff Date: Mon, 1 Aug 2011 20:35:48 +0000 (+0000) Subject: LRN: Don't wait for parent control handler to quit X-Git-Tag: initial-import-from-subversion-38251~17557 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=fce3f96f9ffad4d63a172240b6b20d89e3f6dac7;p=oweals%2Fgnunet.git LRN: Don't wait for parent control handler to quit CG: Note: this should not stand; temporary hack. --- diff --git a/src/include/gnunet_os_lib.h b/src/include/gnunet_os_lib.h index 715061161..328f20c35 100644 --- a/src/include/gnunet_os_lib.h +++ b/src/include/gnunet_os_lib.h @@ -339,6 +339,13 @@ GNUNET_OS_install_parent_control_handler (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc); +/** + * Called everty time the parent process sends a signal + */ +void +parent_control_handler (void *cls, + const struct + GNUNET_SCHEDULER_TaskContext * tc); /** * Check whether an executable exists and possibly diff --git a/src/util/os_priority.c b/src/util/os_priority.c index d214372d7..c9458212e 100644 --- a/src/util/os_priority.c +++ b/src/util/os_priority.c @@ -51,7 +51,7 @@ static struct GNUNET_OS_Process current_process; * @param cls the 'struct GNUNET_DISK_FileHandle' of the control pipe * @param tc scheduler context */ -static void +void parent_control_handler (void *cls, const struct GNUNET_SCHEDULER_TaskContext * tc) diff --git a/src/util/scheduler.c b/src/util/scheduler.c index 1e9290adf..eaf965894 100644 --- a/src/util/scheduler.c +++ b/src/util/scheduler.c @@ -751,7 +751,11 @@ GNUNET_SCHEDULER_run (GNUNET_SCHEDULER_Task task, void *task_cls) #endif last_tr = 0; busy_wait_warning = 0; - while ((pending != NULL) || + while ((pending != NULL +#if ENABLE_WINDOWS_WORKAROUNDS + && (pending->callback != parent_control_handler || pending->next != NULL) +#endif + ) || (pending_timeout != NULL) || (ready_count > 0)) {