https://github.com/git/git
Raw File
Tip revision: 5fd09df3937f54c5cfda4f1087f5d99433cce527 authored by Junio C Hamano on 20 November 2013, 19:18:25 UTC
Git 1.8.5-rc3
Tip revision: 5fd09df
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