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:
Stefan Beller 2015-12-15 16:04:09 -08:00 коммит произвёл Junio C Hamano
Родитель b4e04fb66e
Коммит bfb6b53c05
2 изменённых файлов: 10 добавлений и 0 удалений

Просмотреть файл

@ -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);
}

Просмотреть файл

@ -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 */