1#include "test-tool.h"
2#include "cache.h"
3#include "sigchain.h"
45
#define X(f) \
6static void f(int sig) { \
7puts(#f); \
8fflush(stdout); \
9sigchain_pop(sig); \
10raise(sig); \
11}
12X(one)
13X(two)
14X(three)
15#undef X
1617
int cmd__sigchain(int argc, const char **argv)
18{
19sigchain_push(SIGTERM, one);
20sigchain_push(SIGTERM, two);
21sigchain_push(SIGTERM, three);
22raise(SIGTERM);
23return 0;
24}