summaryrefslogtreecommitdiff
path: root/usr.bin/make/cmd_exec.c
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin/make/cmd_exec.c')
-rw-r--r--usr.bin/make/cmd_exec.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/usr.bin/make/cmd_exec.c b/usr.bin/make/cmd_exec.c
index fad09169c84..5bcf89b80d0 100644
--- a/usr.bin/make/cmd_exec.c
+++ b/usr.bin/make/cmd_exec.c
@@ -1,4 +1,4 @@
-/* $OpenBSD: cmd_exec.c,v 1.8 2010/07/19 19:46:43 espie Exp $ */
+/* $OpenBSD: cmd_exec.c,v 1.9 2016/03/05 13:12:12 espie Exp $ */
/*
* Copyright (c) 2001 Marc Espie.
*
@@ -107,7 +107,7 @@ Cmd_Exec(const char *cmd, char **err)
(void)close(fds[0]);
/* Wait for the child to exit. */
- while ((pid = wait(&status)) != cpid && pid >= 0)
+ while (waitpid(cpid, &status, 0) == -1 && errno == EINTR)
continue;
if (cc == -1)