Staging
v0.5.1
https://github.com/git/git
Revision 3b3a8ed4beadf5d9437597108355b23c7143bc81 authored by Junio C Hamano on 10 September 2010, 18:55:55 UTC, committed by Junio C Hamano on 10 September 2010, 18:55:55 UTC
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 5b45c55
Raw File
Tip revision: 3b3a8ed4beadf5d9437597108355b23c7143bc81 authored by Junio C Hamano on 10 September 2010, 18:55:55 UTC
Git 1.7.3 rc1
Tip revision: 3b3a8ed
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