mirror of
https://github.com/DragonOS-Community/DragonOS.git
synced 2025-06-23 16:23:24 +00:00
修复pipe2在读端或写端关闭后还阻塞问题 (#396)
* 修复pipe2在读端或写端关闭后还阻塞问题。 * update * update * 修改cloexec --------- Co-authored-by: longjin <longjin@RinGoTek.cn>
This commit is contained in:
@ -61,7 +61,13 @@ impl Syscall {
|
||||
.basic_mut()
|
||||
.set_name(ProcessControlBlock::generate_name(&path, &argv));
|
||||
|
||||
return Self::do_execve(path, argv, envp, frame);
|
||||
Self::do_execve(path, argv, envp, frame)?;
|
||||
|
||||
// 关闭设置了O_CLOEXEC的文件描述符
|
||||
let fd_table = ProcessManager::current_pcb().fd_table();
|
||||
fd_table.write().close_on_exec();
|
||||
|
||||
return Ok(());
|
||||
}
|
||||
|
||||
pub fn wait4(
|
||||
|
Reference in New Issue
Block a user