Skip to content

Commit ab46319

Browse files
committed
fix linuz
1 parent b0bffbb commit ab46319

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/linux.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ impl ChildProcess for LinuxChildProcess {
5858
type PipeIn = LinuxWritePipe;
5959
type PipeOut = LinuxReadPipe;
6060
fn get_exit_code(&self) -> Result<Option<i64>, Error> {
61-
self.poll()?;
61+
self.wait_for_exit(Duration::from_millis(1))?;
6262
let ec = self.exit_code.load(Ordering::SeqCst);
6363
let ec = match ec {
6464
EXIT_CODE_STILL_RUNNING => None,
@@ -93,7 +93,7 @@ impl ChildProcess for LinuxChildProcess {
9393
}
9494
}
9595

96-
fn is_finished(&self) -> Result<bool, Error> {
96+
fn is_finished(&self) -> bool {
9797
Ok(self.exit_code.load(Ordering::SeqCst) != EXIT_CODE_STILL_RUNNING)
9898
}
9999
}

0 commit comments

Comments
 (0)