THIS IS A TEST INSTANCE ONLY! REPOSITORIES CAN BE DELETED AT ANY TIME!

Browse Source

sigchain: add command to pop all common signals

The new method removes all common signal handlers that were installed
by sigchain_push.

CC: Jeff King <peff@peff.net>
Signed-off-by: Stefan Beller <sbeller@google.com>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
tags/v2.8.0-rc0
Stefan Beller Junio C Hamano 3 years ago
parent
commit
bfb6b53c05
2 changed files with 10 additions and 0 deletions
  1. +9
    -0
      sigchain.c
  2. +1
    -0
      sigchain.h

+ 9
- 0
sigchain.c View File

@@ -50,3 +50,12 @@ void sigchain_push_common(sigchain_fun f)
sigchain_push(SIGQUIT, f);
sigchain_push(SIGPIPE, f);
}

void sigchain_pop_common(void)
{
sigchain_pop(SIGPIPE);
sigchain_pop(SIGQUIT);
sigchain_pop(SIGTERM);
sigchain_pop(SIGHUP);
sigchain_pop(SIGINT);
}

+ 1
- 0
sigchain.h View File

@@ -7,5 +7,6 @@ int sigchain_push(int sig, sigchain_fun f);
int sigchain_pop(int sig);

void sigchain_push_common(sigchain_fun f);
void sigchain_pop_common(void);

#endif /* SIGCHAIN_H */

Loading…
Cancel
Save