Skip to content

Commit

Permalink
Fix isolation code
Browse files Browse the repository at this point in the history
  • Loading branch information
b-ncMN committed Jun 8, 2022
1 parent f5bc58c commit 36d5d95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/shims/env.rs
Original file line number Diff line number Diff line change
Expand Up @@ -475,7 +475,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
);

if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op {
this.reject_in_isolation("getpid", reject_with)?;
this.check_no_isolation("`getpid`")?;
this.set_last_error_from_io_error(ErrorKind::PermissionDenied)?;

return Ok(-1);
Expand All @@ -496,7 +496,7 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
this.assert_target_os("windows", "GetProcessId");

if let IsolatedOp::Reject(reject_with) = this.machine.isolated_op {
this.reject_in_isolation("`GetProcessId`", reject_with)?;
this.check_no_isolation("`GetCurrentProcessId`")?;
this.set_last_error_from_io_error(ErrorKind::PermissionDenied)?;
return Ok(0);
}
Expand Down

0 comments on commit 36d5d95

Please sign in to comment.