|
From: <mad...@us...> - 2006-11-29 21:12:09
|
Revision: 2114
http://svn.sourceforge.net/selinux/?rev=2114&view=rev
Author: madmethod
Date: 2006-11-29 13:12:08 -0800 (Wed, 29 Nov 2006)
Log Message:
-----------
Author: Daniel J Walsh
Email: dw...@re...
Subject: More small fixes to policycoreutils
Date: Wed, 22 Nov 2006 15:08:44 -0500
Amy's patch for handling exit codes in newrole.
Acked-By: Joshua Brindle <jbr...@tr...>
Acked-By: Stephen Smalley <sd...@ty...>
Modified Paths:
--------------
trunk/policycoreutils/newrole/newrole.c
Modified: trunk/policycoreutils/newrole/newrole.c
===================================================================
--- trunk/policycoreutils/newrole/newrole.c 2006-11-29 21:11:24 UTC (rev 2113)
+++ trunk/policycoreutils/newrole/newrole.c 2006-11-29 21:12:08 UTC (rev 2114)
@@ -1068,11 +1068,16 @@
*/
int rc;
int exit_code = 0;
+ int status;
do {
- rc = wait(NULL);
+ rc = wait(&status);
} while (rc < 0 && errno == EINTR);
+ /* Preserve child exit status, unless there is another error. */
+ if (WIFEXITED(status))
+ exit_code = WEXITSTATUS(status);
+
if (restore_tty_label(fd, ttyn, tty_context, new_tty_context)) {
fprintf(stderr, _("Unable to restore tty label...\n"));
exit_code = -1;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|