summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--sysdeps/unix/sysv/linux/spawni.c10
2 files changed, 10 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 7cb7ce5b83..f7688a7ecd 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2017-10-21 Adhemerval Zanella <adhemerval.zanella@linaro.org>
+
+ * sysdeps/unix/sysv/linux/spawni.c (__spawnix): Use 0 instead of
+ WNOHANG in waitpid call.
+
2017-10-20 Joseph Myers <joseph@codesourcery.com>
* bits/floatn-common.h: New file.
diff --git a/sysdeps/unix/sysv/linux/spawni.c b/sysdeps/unix/sysv/linux/spawni.c
index d15fbb1eca..fb83c2ed53 100644
--- a/sysdeps/unix/sysv/linux/spawni.c
+++ b/sysdeps/unix/sysv/linux/spawni.c
@@ -374,12 +374,12 @@ __spawnix (pid_t * pid, const char *file,
ec = args.err;
if (ec > 0)
/* There still an unlikely case where the child is cancelled after
- setting args.err, due to a positive error value. Also due a
+ setting args.err, due to a positive error value. Also there is
possible pid reuse race (where the kernel allocated the same pid
- to unrelated process) we need not to undefinitely hang expecting
- an invalid pid. In both cases an error is returned to the
- caller. */
- __waitpid (new_pid, NULL, WNOHANG);
+ to an unrelated process). Unfortunately due synchronization
+ issues where the kernel might not have the process collected
+ the waitpid below can not use WNOHANG. */
+ __waitpid (new_pid, NULL, 0);
}
else
ec = -new_pid;