summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2011-07-16 05:57:19 -0700
committerPaul Eggert <eggert@cs.ucla.edu>2011-07-16 12:10:45 -0700
commit8f1629f0ad72437c034e06b4a2e04bf2e157c0bd (patch)
treea01d10df1bc931e7c2ae6207c247659bbb84f140 /src
parent8d8f5f10280ea00e21024381e70da3a81c36ae3e (diff)
downloadcoreutils-8f1629f0ad72437c034e06b4a2e04bf2e157c0bd.tar.xz
* src/timeout.c (main): Use waitpid, not wait (Bug#9098).
Reported by Andreas Schwab. * src/timeout.c (SA_RESTART): Define to 0 if not defined.
Diffstat (limited to 'src')
-rw-r--r--src/timeout.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/timeout.c b/src/timeout.c
index 895d72038..2d6dad8fb 100644
--- a/src/timeout.c
+++ b/src/timeout.c
@@ -365,7 +365,8 @@ main (int argc, char **argv)
alarm (timeout);
- while ((wait_result = wait (&status)) < 0 && errno == EINTR)
+ while ((wait_result = waitpid (monitored_pid, &status, 0)) < 0
+ && errno == EINTR)
continue;
if (wait_result < 0)