mirror of
https://github.com/git/git.git
synced 2025-12-12 20:36:24 +01:00
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>
This commit is contained in:
committed by
Junio C Hamano
parent
b4e04fb66e
commit
bfb6b53c05
@@ -50,3 +50,12 @@ void sigchain_push_common(sigchain_fun f)
|
|||||||
sigchain_push(SIGQUIT, f);
|
sigchain_push(SIGQUIT, f);
|
||||||
sigchain_push(SIGPIPE, 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);
|
||||||
|
}
|
||||||
|
|||||||
@@ -7,5 +7,6 @@ int sigchain_push(int sig, sigchain_fun f);
|
|||||||
int sigchain_pop(int sig);
|
int sigchain_pop(int sig);
|
||||||
|
|
||||||
void sigchain_push_common(sigchain_fun f);
|
void sigchain_push_common(sigchain_fun f);
|
||||||
|
void sigchain_pop_common(void);
|
||||||
|
|
||||||
#endif /* SIGCHAIN_H */
|
#endif /* SIGCHAIN_H */
|
||||||
|
|||||||
Reference in New Issue
Block a user