Module Name: src Committed By: gson Date: Mon Aug 9 10:46:39 UTC 2021
Modified Files: src/usr.bin/progress: progress.c Log Message: Test errno when the return value from wait() indicates an error, not when it indicates success. PR install/56303. To generate a diff of this commit: cvs rdiff -u -r1.23 -r1.24 src/usr.bin/progress/progress.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/usr.bin/progress/progress.c diff -u src/usr.bin/progress/progress.c:1.23 src/usr.bin/progress/progress.c:1.24 --- src/usr.bin/progress/progress.c:1.23 Thu Jan 7 12:02:52 2021 +++ src/usr.bin/progress/progress.c Mon Aug 9 10:46:39 2021 @@ -1,4 +1,4 @@ -/* $NetBSD: progress.c,v 1.23 2021/01/07 12:02:52 lukem Exp $ */ +/* $NetBSD: progress.c,v 1.24 2021/08/09 10:46:39 gson Exp $ */ /*- * Copyright (c) 2003 The NetBSD Foundation, Inc. @@ -31,7 +31,7 @@ #include <sys/cdefs.h> #ifndef lint -__RCSID("$NetBSD: progress.c,v 1.23 2021/01/07 12:02:52 lukem Exp $"); +__RCSID("$NetBSD: progress.c,v 1.24 2021/08/09 10:46:39 gson Exp $"); #endif /* not lint */ #include <sys/types.h> @@ -259,7 +259,7 @@ main(int argc, char *argv[]) */ ws = WIFSIGNALED(ws) ? WTERMSIG(ws) : WEXITSTATUS(ws); - if (deadpid != -1 && errno == EINTR) + if (deadpid == -1 && errno == EINTR) continue; if (deadpid == pid) { pid = 0;