* NEWS, src/newgrp.c: Return the exit status of the child. Thanks

to Lionel Elie Mamane.
This commit is contained in:
nekral-guest 2009-05-22 11:10:02 +00:00
parent 2e075ad91b
commit f596cd113c

View File

@ -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 */