[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[commits] r936 - in /fsf/trunk/libc: ChangeLog misc/tst-pselect.c
- To: commits@xxxxxxxxxx
- Subject: [commits] r936 - in /fsf/trunk/libc: ChangeLog misc/tst-pselect.c
- From: eglibc@xxxxxxxxxx
- Date: Fri, 15 Dec 2006 08:01:36 -0000
Author: eglibc
Date: Fri Dec 15 00:01:36 2006
New Revision: 936
Log:
Import glibc-mainline for 2006-12-15
Modified:
fsf/trunk/libc/ChangeLog
fsf/trunk/libc/misc/tst-pselect.c
Modified: fsf/trunk/libc/ChangeLog
==============================================================================
--- fsf/trunk/libc/ChangeLog (original)
+++ fsf/trunk/libc/ChangeLog Fri Dec 15 00:01:36 2006
@@ -1,3 +1,12 @@
+2006-12-14 Jakub Jelinek <jakub@xxxxxxxxxx>
+
+ * misc/tst-pselect.c (do_test): Fix sigblock argument.
+
+2006-12-14 Ulrich Drepper <drepper@xxxxxxxxxx>
+
+ * misc/tst-pselect.c (do_test): Make sure the helper process is
+ terminating when the test is aborted.
+
2006-12-13 Ulrich Drepper <drepper@xxxxxxxxxx>
* sysdeps/unix/sysv/linux/bits/statvfs.h: Define ST_RELATIME.
Modified: fsf/trunk/libc/misc/tst-pselect.c
==============================================================================
--- fsf/trunk/libc/misc/tst-pselect.c (original)
+++ fsf/trunk/libc/misc/tst-pselect.c Fri Dec 15 00:01:36 2006
@@ -29,7 +29,16 @@
return 1;
}
- if (sigblock (SIGUSR1) != 0)
+ sa.sa_handler = SIG_IGN;
+ sa.sa_flags = SA_NOCLDWAIT;
+
+ if (sigaction (SIGCHLD, &sa, NULL) != 0)
+ {
+ puts ("2nd sigaction failed");
+ return 1;
+ }
+
+ if (sigblock (sigmask (SIGUSR1)) != 0)
{
puts ("sigblock failed");
return 1;
@@ -52,6 +61,7 @@
struct timespec to = { .tv_sec = 0, .tv_nsec = 500000000 };
+ pid_t parent = getpid ();
pid_t p = fork ();
if (p == 0)
{
@@ -63,6 +73,9 @@
int e;
do
{
+ if (getppid () != parent)
+ exit (2);
+
errno = 0;
e = pselect (fds[0][0] + 1, &rfds, NULL, NULL, &to, &ss);
}
@@ -108,12 +121,6 @@
return 1;
}
- if (TEMP_FAILURE_RETRY (waitpid (p, NULL, 0)) != p)
- {
- puts ("waitpid failed");
- return 1;
- }
-
return 0;
}