This is the mail archive of the
glibc-cvs@sourceware.org
mailing list for the glibc project.
GNU C Library master sources branch, master, updated. glibc-2.10-276-g85fda49
- From: drepper at sourceware dot org
- To: glibc-cvs at sourceware dot org
- Date: 14 Aug 2009 07:43:30 -0000
- Subject: GNU C Library master sources branch, master, updated. glibc-2.10-276-g85fda49
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".
The branch, master has been updated
via 85fda49b9674152ca54d49e0028f981566f2554d (commit)
from ae0d54500381eb9d40710a259819d9b745a7297f (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://sources.redhat.com/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=85fda49b9674152ca54d49e0028f981566f2554d
commit 85fda49b9674152ca54d49e0028f981566f2554d
Author: Ulrich Drepper <drepper@redhat.com>
Date: Fri Aug 14 00:42:51 2009 -0700
Improve test-skeleton.c to clean up after dead parent.
diff --git a/ChangeLog b/ChangeLog
index 201d740..28a92f4 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2009-08-14 Ulrich Drepper <drepper@redhat.com>
+
+ * test-skeleton.c (signal_handler): Renamed from timeout_handler.
+ Also handle SIGINT. In that case only do the cleanup and then
+ re-raise the signal.
+ (main): Install handler for SIGINT.
+
2009-08-10 SUGIOKA Toshinobu <sugioka@itonet.co.jp>
* stdlib/longlong.h [__sh__] (udiv_qrnnd, sub_ddmmss): Add "t" to
diff --git a/test-skeleton.c b/test-skeleton.c
index 23e4012..0238db6 100644
--- a/test-skeleton.c
+++ b/test-skeleton.c
@@ -1,5 +1,5 @@
/* Skeleton for test programs.
- Copyright (C) 1998,2000-2004, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1998,2000-2004, 2005, 2009 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1998.
@@ -132,7 +132,7 @@ create_temp_file (const char *base, char **filename)
/* Timeout handler. We kill the child and exit with an error. */
static void
__attribute__ ((noreturn))
-timeout_handler (int sig __attribute__ ((unused)))
+signal_handler (int sig __attribute__ ((unused)))
{
int killed;
int status;
@@ -167,6 +167,12 @@ timeout_handler (int sig __attribute__ ((unused)))
CLEANUP_HANDLER;
#endif
+ if (sig == SIGINT)
+ {
+ signal (sig, SIG_DFL);
+ raise (sig);
+ }
+
/* If we expected this signal: good! */
#ifdef EXPECTED_SIGNAL
if (EXPECTED_SIGNAL == SIGALRM)
@@ -325,9 +331,12 @@ main (int argc, char *argv[])
/* Default timeout is two seconds. */
# define TIMEOUT 2
#endif
- signal (SIGALRM, timeout_handler);
+ signal (SIGALRM, signal_handler);
alarm (TIMEOUT * timeoutfactor);
+ /* Make sure we clean up if the wrapper gets interrupted. */
+ signal (SIGINT, signal_handler);
+
/* Wait for the regular termination. */
termpid = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0));
if (termpid == -1)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 7 +++++++
test-skeleton.c | 15 ++++++++++++---
2 files changed, 19 insertions(+), 3 deletions(-)
hooks/post-receive
--
GNU C Library master sources