]> git.ipfire.org Git - thirdparty/git.git/commitdiff
Merge branch 'ti/glibc-stdio-mutex-from-signal-handler'
authorJunio C Hamano <gitster@pobox.com>
Wed, 7 Oct 2015 20:38:16 +0000 (13:38 -0700)
committerJunio C Hamano <gitster@pobox.com>
Wed, 7 Oct 2015 20:38:16 +0000 (13:38 -0700)
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

1  2 
pager.c
run-command.c
run-command.h

diff --cc pager.c
Simple merge
diff --cc run-command.c
Simple merge
diff --cc run-command.h
index 629fab7ae0b2af5c0ada5977a11f862de4cdd273,518663eef5d7c23ed947161fb1162d867d2af7b8..5428b048e2c49dec3e322ac2a46ffddd012e4c8d
@@@ -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, ...);