From: nekral-guest Date: Fri, 22 May 2009 11:10:02 +0000 (+0000) Subject: * NEWS, src/newgrp.c: Return the exit status of the child. Thanks X-Git-Tag: 4.1.4.1~5 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=f596cd113c1e7f4e4f9d35dbe7f155e7122fce91;p=shadow * NEWS, src/newgrp.c: Return the exit status of the child. Thanks to Lionel Elie Mamane. --- diff --git a/src/newgrp.c b/src/newgrp.c index 1b19b90a..e4ea4115 100644 --- a/src/newgrp.c +++ b/src/newgrp.c @@ -347,7 +347,8 @@ static void syslog_sg (const char *name, const char *group) (unsigned long) gid, name)); } closelog (); - exit (E_SUCCESS); + exit ((0 != WIFEXITED (cst)) ? WEXITSTATUS (cst) + : WTERMSIG (cst) + 128); } /* child - restore signals to their default state */