Add comment
This commit is contained in:
parent
085874d1ff
commit
3aff803868
1 changed files with 4 additions and 0 deletions
|
|
@ -140,6 +140,10 @@ pub trait EvalContextExt<'mir, 'tcx: 'mir>: crate::MiriEvalContextExt<'mir, 'tcx
|
|||
this.handle_not_found()
|
||||
}
|
||||
} else if cmd == this.eval_libc_i32("F_DUPFD")? || cmd == this.eval_libc_i32("F_DUPFD_CLOEXEC")? {
|
||||
// Note that we always assume the FD_CLOEXEC flag is set for every open file, in part
|
||||
// because exec() isn't supported. The F_DUPFD and F_DUPFD_CLOEXEC commands only
|
||||
// differ in whether the FD_CLOEXEC flag is pre-set on the duplicated file descriptor,
|
||||
// thus they can share the same implementation here.
|
||||
let arg = match arg_op {
|
||||
Some(arg_op) => this.read_scalar(arg_op)?.to_i32()?,
|
||||
None => throw_unsup_format!("fcntl with command F_DUPFD or F_DUPFD_CLOEXEC requires a third argument"),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue