1#include "cache.h"
2#include "sigchain.h"
34
#define X(f) \
5static void f(int sig) { \
6puts(#f); \
7fflush(stdout); \
8sigchain_pop(sig); \
9raise(sig); \
10}
11X(one)
12X(two)
13X(three)
14#undef X
1516
int main(int argc, char **argv) {
17sigchain_push(SIGTERM, one);
18sigchain_push(SIGTERM, two);
19sigchain_push(SIGTERM, three);
20raise(SIGTERM);
21return 0;
22}