If perform_io() fails, kill the child before exiting so it doesn't

complain about connection reset.  We can get an I/O error if, for
example, and we get EIO reading from stdin.
This commit is contained in:
Todd C. Miller
2010-10-15 16:24:42 -04:00
parent 93d2420de9
commit a11e4c8d72

View File

@@ -310,8 +310,12 @@ sudo_execve(struct command_details *details, char *argv[], char *envp[],
}
}
if (perform_io(fdsr, fdsw, cstat) != 0)
if (perform_io(fdsr, fdsw, cstat) != 0) {
/* I/O error, kill child if still alive and finish. */
schedule_signal(SIGKILL);
forward_signals(sv[0]);
break;
}
}
if (log_io) {