Skip to content

Commit 896f558

Browse files
committed
with isolation we want to be fully deterministic
1 parent 8ec3425 commit 896f558

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/shims/unix/fs.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,7 +1694,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
16941694
fn isatty(&mut self, miri_fd: &OpTy<'tcx, Tag>) -> InterpResult<'tcx, i32> {
16951695
let this = self.eval_context_mut();
16961696
#[cfg(unix)]
1697-
{
1697+
if matches!(this.machine.isolated_op, IsolatedOp::Allow) {
16981698
let miri_fd = this.read_scalar(miri_fd)?.to_i32()?;
16991699
if let Some(host_fd) =
17001700
this.machine.file_handler.handles.get(&miri_fd).and_then(|fd| fd.as_unix_host_fd())
@@ -1714,7 +1714,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
17141714
}
17151715
}
17161716
// We are attemping to use a Unix interface on a non-Unix platform, or we are on a Unix
1717-
// platform and the passed file descriptor is not open.
1717+
// platform and the passed file descriptor is not open, or isolation is enabled
17181718
// FIXME: It should be possible to emulate this at least on Windows by using
17191719
// GetConsoleMode.
17201720
let enotty = this.eval_libc("ENOTTY")?;

0 commit comments

Comments
 (0)