Treat req. pid == pid the same as req. pid == 0 in setpgrp

This commit is contained in:
Mark
2020-07-05 18:54:41 +03:00
parent b8a9f12307
commit b6f29c2cd7
+4
View File
@@ -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) {