浏览代码

fix(setpgid): move the process to new pgroup

greatbridf 3 月之前
父节点
当前提交
aabe4b75b7
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      src/kernel/task/process.rs

+ 2 - 0
src/kernel/task/process.rs

@@ -299,6 +299,8 @@ impl Process {
                 return Ok(());
                 return Ok(());
             }
             }
 
 
+            new_pgroup.add_member(self, procs.as_pos_mut());
+
             new_pgroup
             new_pgroup
         } else {
         } else {
             // Create a new process group only if `pgid` matches our `pid`.
             // Create a new process group only if `pgid` matches our `pid`.