bugfix: 修复进程退出时未释放signal和sighand && 增加赞赏者名单:David Wen (#93)

* bugfix: 修复进程退出时未释放signal和sighand的bug

* 增加赞赏者名单:David Wen
This commit is contained in:
login 2022-11-23 21:34:35 +08:00 committed by GitHub
parent 0274cd6eee
commit ad23fcddf8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 4 deletions

View File

@ -90,6 +90,7 @@
### 个人赞赏者列表
- David Wen
- 悟
- [TerryLeeSCUT · GitHub](https://github.com/TerryLeeSCUT)
- slientbard

View File

@ -80,6 +80,7 @@ We hope that in the future, some enterprises can sponsor DragonOS and inject fin
### Individual Sponsor List
- David Wen
- 悟
- [TerryLeeSCUT · GitHub](https://github.com/TerryLeeSCUT)
- slientbard

View File

@ -46,6 +46,9 @@ extern struct mm_struct initial_mm;
extern struct signal_struct INITIAL_SIGNALS;
extern struct sighand_struct INITIAL_SIGHAND;
extern void process_exit_sighand(struct process_control_block *pcb);
extern void process_exit_signal(struct process_control_block *pcb);
// 设置初始进程的PCB
#define INITIAL_PROC(proc) \
{ \
@ -91,8 +94,6 @@ uint64_t process_exit_files(struct process_control_block *pcb);
*/
uint64_t process_exit_mm(struct process_control_block *pcb);
/**
* @brief
*
@ -784,7 +785,6 @@ uint64_t process_exit_mm(struct process_control_block *pcb)
return 0;
}
/**
* @brief todo: 线
*
@ -811,7 +811,8 @@ int process_release_pcb(struct process_control_block *pcb)
// todo: 对相关的pcb加锁
pcb->prev_pcb->next_pcb = pcb->next_pcb;
pcb->next_pcb->prev_pcb = pcb->prev_pcb;
process_exit_sighand(pcb);
process_exit_signal(pcb);
// 释放当前pcb
kfree(pcb);
return 0;