Source-Changes-HG archive

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

[src/trunk]: src/usr.bin/script Unlike done() childwait() returns, found by c...



details:   https://anonhg.NetBSD.org/src/rev/57e0d51b65a1
branches:  trunk
changeset: 938029:57e0d51b65a1
user:      christos <christos%NetBSD.org@localhost>
date:      Mon Aug 31 15:32:15 2020 +0000

description:
Unlike done() childwait() returns, found by clang.

diffstat:

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

diffs (34 lines):

diff -r d6ba188396ca -r 57e0d51b65a1 usr.bin/script/script.c
--- a/usr.bin/script/script.c   Mon Aug 31 14:12:50 2020 +0000
+++ b/usr.bin/script/script.c   Mon Aug 31 15:32:15 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: script.c,v 1.27 2020/08/28 17:10:15 christos Exp $     */
+/*     $NetBSD: script.c,v 1.28 2020/08/31 15:32:15 christos Exp $     */
 
 /*
  * Copyright (c) 1980, 1992, 1993
@@ -39,7 +39,7 @@
 #if 0
 static char sccsid[] = "@(#)script.c   8.1 (Berkeley) 6/6/93";
 #endif
-__RCSID("$NetBSD: script.c,v 1.27 2020/08/28 17:10:15 christos Exp $");
+__RCSID("$NetBSD: script.c,v 1.28 2020/08/31 15:32:15 christos Exp $");
 #endif /* not lint */
 
 #include <sys/types.h>
@@ -206,7 +206,6 @@
                (void)write(master, ibuf, cc);
        }
        childwait();
-       /* NOTREACHED */
        return EXIT_SUCCESS;
 }
 
@@ -269,6 +268,7 @@
                        (void)fflush(fscript);
        }
        childwait();
+       exit(EXIT_SUCCESS);
 }
 
 static void



Home | Main Index | Thread Index | Old Index