From: Junio C Hamano Date: Fri, 16 Oct 2015 21:32:41 +0000 (-0700) Subject: Merge branch 'ti/glibc-stdio-mutex-from-signal-handler' into maint X-Git-Tag: v2.6.2~15 X-Git-Url: https://git.lorimer.id.au/gitweb.git/diff_plain/267ebf6c84eb4437c219c16848678b090b4af6e2?hp=--cc Merge branch 'ti/glibc-stdio-mutex-from-signal-handler' into maint 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 --- 267ebf6c84eb4437c219c16848678b090b4af6e2 diff --cc run-command.h index 5b4425a3cb,518663eef5..275d35c442 --- 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, ...);