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>
Stefan Beller committed
Dec 15, 2015 at 16:04 UTC
bfb6b53c05daedc4084a5f716804a83781826230
2 files changed
+10
sigchain.c
+9
@@ -50,3 +50,12 @@ void sigchain_push_common(sigchain_fun f)
50
sigchain_push(SIGQUIT, f);
51
sigchain_push(SIGPIPE, f);
52
}
53
+
54
+void sigchain_pop_common(void)
55
+{
56
+ sigchain_pop(SIGPIPE);
57
+ sigchain_pop(SIGQUIT);
58
+ sigchain_pop(SIGTERM);
59
+ sigchain_pop(SIGHUP);
60
+ sigchain_pop(SIGINT);
61
+}
sigchain.h
+1
@@ -7,5 +7,6 @@ int sigchain_push(int sig, sigchain_fun f);
7
int sigchain_pop(int sig);
8
9
void sigchain_push_common(sigchain_fun f);
10
+void sigchain_pop_common(void);
11
12
#endif /* SIGCHAIN_H */