@@ -678,7 +678,7 @@ backchannel_cb(int fd, int what, void *v)
678678 /* Nothing ready. */
679679 break ;
680680 default :
681- if (ec -> cstat -> val == CMD_INVALID ) {
681+ if (ec -> cstat -> type == CMD_INVALID ) {
682682 ec -> cstat -> type = CMD_ERRNO ;
683683 ec -> cstat -> val = errno ;
684684 sudo_debug_printf (SUDO_DEBUG_ERROR ,
@@ -752,7 +752,7 @@ backchannel_cb(int fd, int what, void *v)
752752 break ;
753753 default :
754754 /* Short read, should not happen. */
755- if (ec -> cstat -> val == CMD_INVALID ) {
755+ if (ec -> cstat -> type == CMD_INVALID ) {
756756 ec -> cstat -> type = CMD_ERRNO ;
757757 ec -> cstat -> val = EIO ;
758758 sudo_debug_printf (SUDO_DEBUG_ERROR ,
@@ -1443,7 +1443,7 @@ exec_pty(struct command_details *details,
14431443 /* error from callback */
14441444 sudo_debug_printf (SUDO_DEBUG_ERROR , "event loop exited prematurely" );
14451445 /* XXX: no good way to know if we should terminate the command. */
1446- if (cstat -> val == CMD_INVALID && ec -> cmnd_pid != -1 ) {
1446+ if (cstat -> type == CMD_INVALID && ec -> cmnd_pid != -1 ) {
14471447 /* no status message, kill command */
14481448 terminate_command (ec -> cmnd_pid , true);
14491449 ec -> cmnd_pid = -1 ;
0 commit comments