Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff King <peff@peff.net>2009-01-30 11:21:01 +0300
committerJunio C Hamano <gitster@pobox.com>2009-01-30 12:14:26 +0300
commit0ea8039644968e53d79a8dfbf739c87af4261d46 (patch)
treef69cf13d5e270fc96f73ca98c35a7e559ed990c0 /test-sigchain.c
parenta3da8821208d6243dc5530d668f7c8f089814899 (diff)
t0005: use SIGTERM for sigchain test
The signal tests consists of checking that each of our handlers is executed, and that the test program was killed by the final signal. We arbitrarily used SIGINT as the kill signal. However, some platforms (notably Solaris) will default SIGINT to SIG_IGN if there is no controlling terminal. In that case, we don't end up killing the program with the final signal and the test fails. This is a problem since the test script should not depend on outside factors; let's use SIGTERM instead, which should behave consistently. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'test-sigchain.c')
-rw-r--r--test-sigchain.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/test-sigchain.c b/test-sigchain.c
index 8747deac62..42db234e87 100644
--- a/test-sigchain.c
+++ b/test-sigchain.c
@@ -14,9 +14,9 @@ X(three)
#undef X
int main(int argc, char **argv) {
- sigchain_push(SIGINT, one);
- sigchain_push(SIGINT, two);
- sigchain_push(SIGINT, three);
- raise(SIGINT);
+ sigchain_push(SIGTERM, one);
+ sigchain_push(SIGTERM, two);
+ sigchain_push(SIGTERM, three);
+ raise(SIGTERM);
return 0;
}