repo.or.cz
/
git
/
raj.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
tests: add a special setup where prerequisites fail
[git/raj.git]
/
t
/
helper
/
test-sigchain.c
blob
d013bccddaebd9c7fb0eb4b4c4e1be0643f82260
1
#include
"test-tool.h"
2
#include
"cache.h"
3
#include
"sigchain.h"
4
5
#define X(f) \
6
static void f(int sig) { \
7
puts(#f); \
8
fflush(stdout); \
9
sigchain_pop(sig); \
10
raise(sig); \
11
}
12
X
(
one
)
13
X
(
two
)
14
X
(
three
)
15
#undef X
16
17
int
cmd__sigchain
(
int
argc
,
const char
**
argv
)
18
{
19
sigchain_push
(
SIGTERM
,
one
);
20
sigchain_push
(
SIGTERM
,
two
);
21
sigchain_push
(
SIGTERM
,
three
);
22
raise
(
SIGTERM
);
23
return
0
;
24
}