Module Name:    src
Committed By:   dholland
Date:           Thu Sep  3 06:45:24 UTC 2009

Modified Files:
        src/usr.bin/make: main.c

Log Message:
Use the W* macros to test wait results.
(Mentioned by Joerg in chat a few days ago.)


To generate a diff of this commit:
cvs rdiff -u -r1.171 -r1.172 src/usr.bin/make/main.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/make/main.c
diff -u src/usr.bin/make/main.c:1.171 src/usr.bin/make/main.c:1.172
--- src/usr.bin/make/main.c:1.171	Wed Aug 26 23:17:11 2009
+++ src/usr.bin/make/main.c	Thu Sep  3 06:45:23 2009
@@ -1,4 +1,4 @@
-/*	$NetBSD: main.c,v 1.171 2009/08/26 23:17:11 sjg Exp $	*/
+/*	$NetBSD: main.c,v 1.172 2009/09/03 06:45:23 dholland Exp $	*/
 
 /*
  * Copyright (c) 1988, 1989, 1990, 1993
@@ -69,7 +69,7 @@
  */
 
 #ifndef MAKE_NATIVE
-static char rcsid[] = "$NetBSD: main.c,v 1.171 2009/08/26 23:17:11 sjg Exp $";
+static char rcsid[] = "$NetBSD: main.c,v 1.172 2009/09/03 06:45:23 dholland Exp $";
 #else
 #include <sys/cdefs.h>
 #ifndef lint
@@ -81,7 +81,7 @@
 #if 0
 static char sccsid[] = "@(#)main.c	8.3 (Berkeley) 3/19/94";
 #else
-__RCSID("$NetBSD: main.c,v 1.171 2009/08/26 23:17:11 sjg Exp $");
+__RCSID("$NetBSD: main.c,v 1.172 2009/09/03 06:45:23 dholland Exp $");
 #endif
 #endif /* not lint */
 #endif
@@ -1557,7 +1557,9 @@
 	if (cc == 0)
 	    *errnum = "Couldn't read shell's output for \"%s\"";
 
-	if (status)
+	if (WIFSIGNALED(status))
+	    *errnum = "\"%s\" exited on a signal";
+	else if (WEXITSTATUS(status) != 0)
 	    *errnum = "\"%s\" returned non-zero status";
 
 	/*

Reply via email to