Treat req. pid == pid the same as req. pid == 0 in setpgrp
This commit is contained in:
@@ -657,6 +657,10 @@ int sys_setpgid(pid_t pid, pid_t pgrp) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
if (pid == thr->pid) {
|
||||
thr->pgid = pgrp;
|
||||
return 0;
|
||||
}
|
||||
// Find child with pid pid (guess only children can be setpgid'd)
|
||||
struct thread *chld = thread_child(thr, pid);
|
||||
if (!chld) {
|
||||
|
||||
Reference in New Issue
Block a user