mirror of
https://github.com/asterinas/asterinas.git
synced 2025-06-23 09:23:25 +00:00
Clear one bit instead
This commit is contained in:
committed by
Tate, Hongliang Tian
parent
418fb10d6e
commit
03906513aa
@ -53,7 +53,7 @@ pub fn sys_ioctl(fd: FileDesc, cmd: u32, arg: Vaddr, ctx: &Context) -> Result<Sy
|
|||||||
// Clears the close-on-exec flag of the file.
|
// Clears the close-on-exec flag of the file.
|
||||||
let file_table = ctx.process.file_table().lock();
|
let file_table = ctx.process.file_table().lock();
|
||||||
let entry = file_table.get_entry(fd)?;
|
let entry = file_table.get_entry(fd)?;
|
||||||
entry.clear_flags();
|
entry.set_flags(entry.flags() & (!FdFlags::CLOEXEC));
|
||||||
0
|
0
|
||||||
}
|
}
|
||||||
_ => file.ioctl(ioctl_cmd, arg)?,
|
_ => file.ioctl(ioctl_cmd, arg)?,
|
||||||
|
Reference in New Issue
Block a user