new:在fork时拷贝signal和sighand (#91)

* refcount初始化

* new: 实现copy_sighand
del: 删除sighand_struct的wqh, 待将来有需要时,替换成rust版本的

* new: 拷贝signal
bugfix: 解决拷贝sighand时的uaf问题
This commit is contained in:
login
2022-11-23 20:18:22 +08:00
committed by GitHub
parent 66f67c6a95
commit c8025a8879
13 changed files with 226 additions and 62 deletions

View File

@ -28,3 +28,9 @@ pub fn spin_is_locked(lock: &spinlock_t) -> bool {
return if val == 0 { true } else { false };
}
impl Default for spinlock_t {
fn default() -> Self {
Self { lock: 1 }
}
}