[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[6279] ignore exit status of man
From: |
Gavin D. Smith |
Subject: |
[6279] ignore exit status of man |
Date: |
Mon, 18 May 2015 16:03:34 +0000 |
Revision: 6279
http://svn.sv.gnu.org/viewvc/?view=rev&root=texinfo&revision=6279
Author: gavin
Date: 2015-05-18 16:03:33 +0000 (Mon, 18 May 2015)
Log Message:
-----------
ignore exit status of man
Modified Paths:
--------------
trunk/ChangeLog
trunk/info/man.c
Modified: trunk/ChangeLog
===================================================================
--- trunk/ChangeLog 2015-05-18 15:31:11 UTC (rev 6278)
+++ trunk/ChangeLog 2015-05-18 16:03:33 UTC (rev 6279)
@@ -9,6 +9,9 @@
running it in a subshell. If exit status of "read -t" is 1,
report that an end-of-file was likely.
+ * info/man.c (get_manpage_from_formatter): Ignore exit status of
+ man page formatter.
+
2015-05-17 Gavin Smith <address@hidden>
* info/t/Init-test.inc: Split GINFO variable into GINFO and
Modified: trunk/info/man.c
===================================================================
--- trunk/info/man.c 2015-05-18 15:31:11 UTC (rev 6278)
+++ trunk/info/man.c 2015-05-18 16:03:33 UTC (rev 6279)
@@ -395,27 +395,31 @@
if (!formatted_page)
return 0;
- if (formatter_status != 0) /* Check for failure. */
- {
- int i;
- char *p;
- /* It is possible for "man -a" to output a man page and still to exit
- with a non-zero status. This was found to happen when duplicate man
- pages were found. Hence, still treat it as a success if more than
- three lines were output. (A small amount of output could be error
- messages that were sent to standard output.) */
- p = formatted_page;
- for (i = 0; i < 3; i++)
- {
- p = strchr (p, '\n');
- if (!p)
- {
- free (formatted_page);
- return NULL;
- }
- p++;
- }
- }
+ /* We could check the exit status of "man -a" to see if successfully
+ output a man page However:
+ * It is possible for "man -a" to output a man page and still to exit with
+ a non-zero status. This was found to happen when duplicate man pages
+ were found.
+ * "man" was found to exit with a zero status on Solaris 10 even when
+ it found nothing.
+ Hence, treat it as a success if more than three lines were output. (A
+ small amount of output could be error messages that were sent to standard
+ output.) */
+ {
+ int i;
+ char *p;
+ p = formatted_page;
+ for (i = 0; i < 3; i++)
+ {
+ p = strchr (p, '\n');
+ if (!p)
+ {
+ free (formatted_page);
+ return NULL;
+ }
+ p++;
+ }
+ }
/* If we have the page, then clean it up. */
clean_manpage (formatted_page);
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [6279] ignore exit status of man,
Gavin D. Smith <=