]> git.ipfire.org Git - thirdparty/git.git/blame - test-sigchain.c
Git 1.7.8-rc2
[thirdparty/git.git] / test-sigchain.c
CommitLineData
4a16d072
JK
1#include "sigchain.h"
2#include "cache.h"
3
4#define X(f) \
5static void f(int sig) { \
6 puts(#f); \
7 fflush(stdout); \
8 sigchain_pop(sig); \
9 raise(sig); \
10}
11X(one)
12X(two)
13X(three)
14#undef X
15
16int main(int argc, char **argv) {
0ea80396
JK
17 sigchain_push(SIGTERM, one);
18 sigchain_push(SIGTERM, two);
19 sigchain_push(SIGTERM, three);
20 raise(SIGTERM);
4a16d072
JK
21 return 0;
22}