diff --exclude-from=exclude --exclude='*.po' --exclude='*.pot' -N -u -r nsapolicycoreutils/newrole/newrole.c policycoreutils-1.33.4/newrole/newrole.c --- nsapolicycoreutils/newrole/newrole.c 2006-11-20 12:19:55.000000000 -0500 +++ policycoreutils-1.33.4/newrole/newrole.c 2006-11-22 14:11:25.000000000 -0500 @@ -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;