t / helper / test-sigchain.con commit Merge branch 'sb/oid-object-info' (fcb6df3)
   1#include "test-tool.h"
   2#include "cache.h"
   3#include "sigchain.h"
   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
  17int cmd__sigchain(int argc, const char **argv) {
  18        sigchain_push(SIGTERM, one);
  19        sigchain_push(SIGTERM, two);
  20        sigchain_push(SIGTERM, three);
  21        raise(SIGTERM);
  22        return 0;
  23}