Merge pull request #72 from stoeckmann/su-regression

Reset pid_child only if waitpid was successful.
This commit is contained in:
Serge Hallyn 2017-05-14 11:41:40 -05:00 committed by GitHub
commit 8e51ec9ee4

View File

@ -379,7 +379,7 @@ static void prepare_pam_close_session (void)
/* wake child when resumed */
kill (pid, SIGCONT);
stop = false;
} else {
} else if ( (pid_t)-1 != pid) {
pid_child = 0;
}
} while (!stop);