Staging
v0.5.1
https://github.com/git/git
Raw File
Tip revision: 92c1e717779a9aa3267cef232ce80ac93e3460fe authored by Junio C Hamano on 29 September 2010, 16:42:53 UTC
Git 1.7.3.1
Tip revision: 92c1e71
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