Skip to content

Commit bfb6b53

Browse files
stefanbellergitster
authored andcommitted
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 <[email protected]> Signed-off-by: Stefan Beller <[email protected]> Signed-off-by: Junio C Hamano <[email protected]>
1 parent b4e04fb commit bfb6b53

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

sigchain.c

+9
Original file line numberDiff line numberDiff line change
@@ -50,3 +50,12 @@ void sigchain_push_common(sigchain_fun f)
5050
sigchain_push(SIGQUIT, f);
5151
sigchain_push(SIGPIPE, f);
5252
}
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
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,6 @@ int sigchain_push(int sig, sigchain_fun f);
77
int sigchain_pop(int sig);
88

99
void sigchain_push_common(sigchain_fun f);
10+
void sigchain_pop_common(void);
1011

1112
#endif /* SIGCHAIN_H */

0 commit comments

Comments
 (0)