Module Name:    src
Committed By:   martin
Date:           Thu Apr  9 11:28:32 UTC 2020

Modified Files:
        src/usr.bin/man [netbsd-9]: man.c

Log Message:
Pull up following revision(s) (requested by maya in ticket #824):

        usr.bin/man/man.c: revision 1.68

Exit successfully after printing the search path, stop further processing.

Continuing to process had the unintended effect that `man` failed to find
a matching manual page for {EMPTY LIST OF REQUESTED MANUAL PAGES}, and
exited with 1.

Prompted by a fish shell snippet that tried and failed to distinguish between
FreeBSD man (-p takes argument) and NetBSD man (-p no argument) by comparing
`man -p` exit code.

ok riastradh, logix (which also pointed out the manual page SYNOPSIS is
saying man -p should be used this way).


To generate a diff of this commit:
cvs rdiff -u -r1.67 -r1.67.4.1 src/usr.bin/man/man.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/man/man.c
diff -u src/usr.bin/man/man.c:1.67 src/usr.bin/man/man.c:1.67.4.1
--- src/usr.bin/man/man.c:1.67	Fri Jun 15 20:16:35 2018
+++ src/usr.bin/man/man.c	Thu Apr  9 11:28:32 2020
@@ -1,4 +1,4 @@
-/*	$NetBSD: man.c,v 1.67 2018/06/15 20:16:35 mrg Exp $	*/
+/*	$NetBSD: man.c,v 1.67.4.1 2020/04/09 11:28:32 martin Exp $	*/
 
 /*
  * Copyright (c) 1987, 1993, 1994, 1995
@@ -40,7 +40,7 @@ __COPYRIGHT("@(#) Copyright (c) 1987, 19
 #if 0
 static char sccsid[] = "@(#)man.c	8.17 (Berkeley) 1/31/95";
 #else
-__RCSID("$NetBSD: man.c,v 1.67 2018/06/15 20:16:35 mrg Exp $");
+__RCSID("$NetBSD: man.c,v 1.67.4.1 2020/04/09 11:28:32 martin Exp $");
 #endif
 #endif /* not lint */
 
@@ -363,8 +363,10 @@ main(int argc, char **argv)
 
 	}
 
-	if (m.getpath) 
+	if (m.getpath) {
 		printmanpath(&m);
+		exit(cleanup());
+	}
 		
 	/*
 	 * now m.mymanpath is complete!

Reply via email to