Source-Changes-HG archive

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

[src/netbsd-9]: src/usr.bin/man Pull up following revision(s) (requested by m...



details:   https://anonhg.NetBSD.org/src/rev/32819511e2fa
branches:  netbsd-9
changeset: 963769:32819511e2fa
user:      martin <martin%NetBSD.org@localhost>
date:      Thu Apr 09 11:28:32 2020 +0000

description:
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).

diffstat:

 usr.bin/man/man.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (30 lines):

diff -r 259ac8f03c0a -r 32819511e2fa usr.bin/man/man.c
--- a/usr.bin/man/man.c Mon Apr 06 14:59:48 2020 +0000
+++ b/usr.bin/man/man.c Thu Apr 09 11:28:32 2020 +0000
@@ -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 @@
 #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 @@
 
        }
 
-       if (m.getpath) 
+       if (m.getpath) {
                printmanpath(&m);
+               exit(cleanup());
+       }
                
        /*
         * now m.mymanpath is complete!



Home | Main Index | Thread Index | Old Index