Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/exec_monitor.c
Original file line number Diff line number Diff line change
Expand Up @@ -276,7 +276,7 @@ mon_errsock_cb(int fd, int what, void *v)
nread = read(fd, &errval, sizeof(errval));
if (nread < 0) {
if (errno != EAGAIN && errno != EINTR) {
if (mc->cstat->val == CMD_INVALID) {
if (mc->cstat->type == CMD_INVALID) {
/* XXX - need a way to distinguish non-exec error. */
mc->cstat->type = CMD_ERRNO;
mc->cstat->val = errno;
Expand Down
2 changes: 1 addition & 1 deletion src/exec_nopty.c
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ errpipe_cb(int fd, int what, void *v)
switch (nread) {
case -1:
if (errno != EAGAIN && errno != EINTR) {
if (ec->cstat->val == CMD_INVALID) {
if (ec->cstat->type == CMD_INVALID) {
/* XXX - need a way to distinguish non-exec error. */
ec->cstat->type = CMD_ERRNO;
ec->cstat->val = errno;
Expand Down
6 changes: 3 additions & 3 deletions src/exec_pty.c
Original file line number Diff line number Diff line change
Expand Up @@ -678,7 +678,7 @@ backchannel_cb(int fd, int what, void *v)
/* Nothing ready. */
break;
default:
if (ec->cstat->val == CMD_INVALID) {
if (ec->cstat->type == CMD_INVALID) {
ec->cstat->type = CMD_ERRNO;
ec->cstat->val = errno;
sudo_debug_printf(SUDO_DEBUG_ERROR,
Expand Down Expand Up @@ -752,7 +752,7 @@ backchannel_cb(int fd, int what, void *v)
break;
default:
/* Short read, should not happen. */
if (ec->cstat->val == CMD_INVALID) {
if (ec->cstat->type == CMD_INVALID) {
ec->cstat->type = CMD_ERRNO;
ec->cstat->val = EIO;
sudo_debug_printf(SUDO_DEBUG_ERROR,
Expand Down Expand Up @@ -1443,7 +1443,7 @@ exec_pty(struct command_details *details,
/* error from callback */
sudo_debug_printf(SUDO_DEBUG_ERROR, "event loop exited prematurely");
/* XXX: no good way to know if we should terminate the command. */
if (cstat->val == CMD_INVALID && ec->cmnd_pid != -1) {
if (cstat->type == CMD_INVALID && ec->cmnd_pid != -1) {
/* no status message, kill command */
terminate_command(ec->cmnd_pid, true);
ec->cmnd_pid = -1;
Expand Down
Loading