From c1cdd0e7f8dae0ac256081d37322a75aff16250a Mon Sep 17 00:00:00 2001 From: David Levine Date: Sun, 11 Jan 2015 19:05:11 -0600 Subject: [PATCH] Have show_content_aux2(), and therefore show_content_aux(), return the status of the process used to show, instead of (usually) OK. (cherry picked from commit a70006bbdf676639961877b02a19e9e1f1d0ec78) --- uip/mhshowsbr.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) 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); + } } } -- 2.56.0