diff --git a/src/exec/use_pty/monitor.rs b/src/exec/use_pty/monitor.rs index 3d253c11..214dca38 100644 --- a/src/exec/use_pty/monitor.rs +++ b/src/exec/use_pty/monitor.rs @@ -1,4 +1,4 @@ -use std::{ffi::c_int, io, os::unix::process::CommandExt, process::Command}; +use std::{convert::Infallible, ffi::c_int, io, os::unix::process::CommandExt, process::Command}; use crate::exec::{opt_fmt, signal_fmt}; use crate::system::signal::{ @@ -17,7 +17,6 @@ use crate::{ exec::{ event::{PollEvent, StopReason}, use_pty::{SIGCONT_BG, SIGCONT_FG}, - ExecOutput, }, log::{dev_error, dev_info, dev_warn}, system::FileCloser, @@ -36,7 +35,6 @@ use crate::{ use super::CommandStatus; -// FIXME: This should return `io::Result` but `!` is not stable yet. pub(super) fn exec_monitor( pty_follower: PtyFollower, command: Command, @@ -44,7 +42,7 @@ pub(super) fn exec_monitor( backchannel: &mut MonitorBackchannel, mut file_closer: FileCloser, original_set: Option, -) -> io::Result { +) -> io::Result { // SIGTTIN and SIGTTOU are ignored here but the docs state that it shouldn't // be possible to receive them in the first place. Investigate match SignalHandler::register(SIGTTIN, SignalHandlerBehavior::Ignore) { diff --git a/src/exec/use_pty/parent.rs b/src/exec/use_pty/parent.rs index f5b35226..377f0f67 100644 --- a/src/exec/use_pty/parent.rs +++ b/src/exec/use_pty/parent.rs @@ -182,7 +182,7 @@ pub(in crate::exec) fn exec_pty( file_closer, original_set, ) { - Ok(exec_output) => return Ok(exec_output), + Ok(exec_output) => match exec_output {}, Err(err) => { // Disable nonblocking assetions as we will not poll the backchannel anymore. backchannels.monitor.set_nonblocking_assertions(true);