From: Junio C Hamano Date: Wed, 7 Oct 2015 20:38:16 +0000 (-0700) Subject: Merge branch 'ti/glibc-stdio-mutex-from-signal-handler' X-Git-Tag: v2.7.0-rc0~127 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2b72dbbcf3a1d6c6813db2c13afaa1d0d8585f7b;p=git Merge branch 'ti/glibc-stdio-mutex-from-signal-handler' Allocation related functions and stdio are unsafe things to call inside a signal handler, and indeed killing the pager can cause glibc to deadlock waiting on allocation mutex as our signal handler tries to free() some data structures in wait_for_pager(). Reduce these unsafe calls. * ti/glibc-stdio-mutex-from-signal-handler: pager: don't use unsafe functions in signal handlers --- 2b72dbbcf3a1d6c6813db2c13afaa1d0d8585f7b diff --cc run-command.h index 629fab7ae0,518663eef5..5428b048e2 --- a/run-command.h +++ b/run-command.h @@@ -50,13 -50,9 +50,14 @@@ void child_process_init(struct child_pr int start_command(struct child_process *); int finish_command(struct child_process *); + int finish_command_in_signal(struct child_process *); int run_command(struct child_process *); +/* + * Returns the path to the hook file, or NULL if the hook is missing + * or disabled. Note that this points to static storage that will be + * overwritten by further calls to find_hook and run_hook_*. + */ extern const char *find_hook(const char *name); LAST_ARG_MUST_BE_NULL extern int run_hook_le(const char *const *env, const char *name, ...);