Staging
v0.5.1
https://github.com/git/git
Raw File
Tip revision: 9504f3d3d2e62cb6fba9e7c61c6fe69dec9053a4 authored by Junio C Hamano on 20 January 2010, 21:29:21 UTC
Git 1.6.6.1
Tip revision: 9504f3d
test-sigchain.c
#include "sigchain.h"
#include "cache.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