]> diplodocus.org Git - nmh/commitdiff
Have show_content_aux2(), and therefore show_content_aux(), return
authorDavid Levine <levinedl@acm.org>
Mon, 12 Jan 2015 01:05:11 +0000 (19:05 -0600)
committerDavid Levine <levinedl@acm.org>
Mon, 12 Jan 2015 01:09:20 +0000 (19:09 -0600)
the status of the process used to show, instead of (usually) OK.

(cherry picked from commit a70006bbdf676639961877b02a19e9e1f1d0ec78)

uip/mhshowsbr.c

index a9aa9c0b7c6a91bdc6ee53bb0ad82e3c38862726..440fa9e738c60f119bf6cd2f2b1ad6974b98dd15 100644 (file)
@@ -481,14 +481,17 @@ show_content_aux2 (CT ct, int alternate, char *cracked, char *buffer,
            _exit (-1);
            /* NOTREACHED */
 
-       default:
+       default: {
+           int status;
+
            arglist_free(file, vec);
 
-           pidcheck (pidXwait (child_id, NULL));
+           pidcheck ((status = pidXwait (child_id, NULL)));
 
            if (fd != NOTOK)
                (*ct->c_ceclosefnx) (ct);
-           return (alternate ? DONE : OK);
+           return (alternate ? DONE : status);
+        }
     }
 }