Staging
v0.5.1
https://github.com/git/git
Revision 503f464090d835ad333f5a55662ca0880c7b1d44 authored by Junio C Hamano on 02 May 2009, 06:31:00 UTC, committed by Junio C Hamano on 02 May 2009, 06:31:00 UTC
Signed-off-by: Junio C Hamano <gitster@pobox.com>
1 parent a8816e7
Raw File
Tip revision: 503f464090d835ad333f5a55662ca0880c7b1d44 authored by Junio C Hamano on 02 May 2009, 06:31:00 UTC
GIT 1.6.3-rc4
Tip revision: 503f464
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