1
0
mirror of https://sourceware.org/git/glibc.git synced 2025-08-01 10:06:57 +03:00
* test-skeleton.c (main): Use TEMP_FAILURE_RETRY with waitpid.
This commit is contained in:
Ulrich Drepper
2003-06-07 00:40:13 +00:00
parent b1bfeac00b
commit 5385447635
2 changed files with 4 additions and 2 deletions

View File

@ -290,11 +290,11 @@ main (int argc, char *argv[])
/* Default timeout is two seconds. */
# define TIMEOUT 2
#endif
alarm (TIMEOUT);
signal (SIGALRM, timeout_handler);
alarm (TIMEOUT);
/* Wait for the regular termination. */
termpid = waitpid (pid, &status, 0);
termpid = TEMP_FAILURE_RETRY (waitpid (pid, &status, 0));
if (termpid == -1)
{
printf ("Waiting for test program failed: %m\n");