From: David Levine Date: Mon, 12 Jan 2015 01:05:11 +0000 (-0600) Subject: Have show_content_aux2(), and therefore show_content_aux(), return X-Git-Url: https://diplodocus.org/git/nmh/commitdiff_plain/a70006bbdf676639961877b02a19e9e1f1d0ec78?ds=inline;hp=-c Have show_content_aux2(), and therefore show_content_aux(), return the status of the process used to show, instead of (usually) OK. --- a70006bbdf676639961877b02a19e9e1f1d0ec78 diff --git a/uip/mhshowsbr.c b/uip/mhshowsbr.c index a9aa9c0b..440fa9e7 100644 --- a/uip/mhshowsbr.c +++ b/uip/mhshowsbr.c @@ -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); + } } }