Merge branch 'jz/gitweb-conf-doc-fix' into maint
[git.git] / test-sigchain.c
blobe499fce60ff50069ace6174ef9fa3ca4aff0cdc8
1 #include "cache.h"
2 #include "sigchain.h"
4 #define X(f) \
5 static void f(int sig) { \
6 puts(#f); \
7 fflush(stdout); \
8 sigchain_pop(sig); \
9 raise(sig); \
11 X(one)
12 X(two)
13 X(three)
14 #undef X
16 int main(int argc, char **argv) {
17 sigchain_push(SIGTERM, one);
18 sigchain_push(SIGTERM, two);
19 sigchain_push(SIGTERM, three);
20 raise(SIGTERM);
21 return 0;