Staging
v0.5.1
https://github.com/git/git
Raw File
Tip revision: 12fb25dce80f6804da73e0b9451caeeddb1b16d9 authored by Junio C Hamano on 23 November 2009, 03:16:01 UTC
Git v1.6.6-rc0
Tip revision: 12fb25d
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