about summary refs log tree commit diff
path: root/xe.c
diff options
context:
space:
mode:
authorLeah Neukirchen <leah@vuxu.org>2017-11-03 21:25:29 +0100
committerLeah Neukirchen <leah@vuxu.org>2017-11-03 21:25:29 +0100
commit102e13e2480d561b0ec536b0cf1ded44c3897566 (patch)
treeac705692135a75a4ee13fb441c72b2047d0688c0 /xe.c
parent89983c064dd6e304a834c897b8d1f0a2bec4b656 (diff)
downloadxe-102e13e2480d561b0ec536b0cf1ded44c3897566.tar.gz
xe-102e13e2480d561b0ec536b0cf1ded44c3897566.tar.xz
xe-102e13e2480d561b0ec536b0cf1ded44c3897566.zip
mywait: always return when wait() fails
Diffstat (limited to 'xe.c')
-rw-r--r--xe.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/xe.c b/xe.c
index 462b147..728102c 100644
--- a/xe.c
+++ b/xe.c
@@ -87,11 +87,8 @@ mywait()
 	pid_t pid;
 
 	pid = wait(&status);
-	if (pid < 0) {
-		if (errno == ECHILD)
-			return 0;
-		// no other error possible?
-	}
+	if (pid < 0)
+		return !(errno == ECHILD);
 
 	int i;
 	for (i = 0; i < maxjobs; i++)