Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.bin/make make(1): mark strange code that calls exit(signo)



details:   https://anonhg.NetBSD.org/src/rev/35c6f553d82f
branches:  trunk
changeset: 979024:35c6f553d82f
user:      rillig <rillig%NetBSD.org@localhost>
date:      Fri Dec 11 22:33:06 2020 +0000

description:
make(1): mark strange code that calls exit(signo)

In other places, the exit status of make is carefully chosen to be 0
(success), 1 (did not make everything), 2 (other error).  Using a signal
number is not guaranteed to be consistent among operating systems and is
therefore a weird choice.

diffstat:

 usr.bin/make/job.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r 6c145629f319 -r 35c6f553d82f usr.bin/make/job.c
--- a/usr.bin/make/job.c        Fri Dec 11 21:52:19 2020 +0000
+++ b/usr.bin/make/job.c        Fri Dec 11 22:33:06 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: job.c,v 1.367 2020/12/11 01:08:51 rillig Exp $ */
+/*     $NetBSD: job.c,v 1.368 2020/12/11 22:33:06 rillig Exp $ */
 
 /*
  * Copyright (c) 1988, 1989, 1990 The Regents of the University of California.
@@ -143,7 +143,7 @@
 #include "trace.h"
 
 /*     "@(#)job.c      8.2 (Berkeley) 3/19/94" */
-MAKE_RCSID("$NetBSD: job.c,v 1.367 2020/12/11 01:08:51 rillig Exp $");
+MAKE_RCSID("$NetBSD: job.c,v 1.368 2020/12/11 22:33:06 rillig Exp $");
 
 /*
  * A shell defines how the commands are run.  All commands for a target are
@@ -2506,7 +2506,7 @@
                }
        }
        Trace_Log(MAKEINTR, NULL);
-       exit(signo);
+       exit(signo);            /* XXX: why signo? */
 }
 
 /*



Home | Main Index | Thread Index | Old Index