]> git.ipfire.org Git - thirdparty/git.git/blame - t/helper/test-sigchain.c
Merge branch 'cw/bisect-replay-with-dos'
[thirdparty/git.git] / t / helper / test-sigchain.c
CommitLineData
e154a6f3 1#include "test-tool.h"
4a16d072 2#include "cache.h"
1c4b6604 3#include "sigchain.h"
4a16d072
JK
4
5#define X(f) \
6static void f(int sig) { \
7 puts(#f); \
8 fflush(stdout); \
9 sigchain_pop(sig); \
10 raise(sig); \
11}
12X(one)
13X(two)
14X(three)
15#undef X
16
3b335762
NTND
17int cmd__sigchain(int argc, const char **argv)
18{
0ea80396
JK
19 sigchain_push(SIGTERM, one);
20 sigchain_push(SIGTERM, two);
21 sigchain_push(SIGTERM, three);
22 raise(SIGTERM);
4a16d072
JK
23 return 0;
24}