Revision 713ee7fe46dce859e46dbb255498ff79cdfb7fba authored by Junio C Hamano on 20 October 2014, 19:23:42 UTC, committed by Junio C Hamano on 20 October 2014, 19:23:43 UTC
* ta/config-set:
  t1308: fix broken here document in test script
2 parent s f9a2fd3 + dc05179
Raw File
test-sigchain.c
#include "cache.h"
#include "sigchain.h"

#define X(f) \
static void f(int sig) { \
	puts(#f); \
	fflush(stdout); \
	sigchain_pop(sig); \
	raise(sig); \
}
X(one)
X(two)
X(three)
#undef X

int main(int argc, char **argv) {
	sigchain_push(SIGTERM, one);
	sigchain_push(SIGTERM, two);
	sigchain_push(SIGTERM, three);
	raise(SIGTERM);
	return 0;
}
back to top