repo.or.cz
/
git
/
spearce.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Introduce the function strip_path_suffix()
[git/spearce.git]
/
test-sigchain.c
blob
42db234e871908514814c9b8dc50cc65d9b093cd
1
#include
"sigchain.h"
2
#include
"cache.h"
3
4
#define X(f) \
5
static void f(int sig) { \
6
puts(#f); \
7
fflush(stdout); \
8
sigchain_pop(sig); \
9
raise(sig); \
10
}
11
X
(
one
)
12
X
(
two
)
13
X
(
three
)
14
#undef X
15
16
int
main
(
int
argc
,
char
**
argv
) {
17
sigchain_push
(
SIGTERM
,
one
);
18
sigchain_push
(
SIGTERM
,
two
);
19
sigchain_push
(
SIGTERM
,
three
);
20
raise
(
SIGTERM
);
21
return
0
;
22
}