Staging
v0.5.1
https://github.com/git/git
Revision 3c3e0b3c41f4c975828cf51d661614e45bf80dc0 authored by Junio C Hamano on 26 May 2011, 16:45:29 UTC, committed by Junio C Hamano on 26 May 2011, 17:29:29 UTC
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent 5a6d82d
Raw File
Tip revision: 3c3e0b3c41f4c975828cf51d661614e45bf80dc0 authored by Junio C Hamano on 26 May 2011, 16:45:29 UTC
Git 1.7.5.3
Tip revision: 3c3e0b3
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