kernel: setpgid fix
This commit is contained in:
parent
3d2e94d387
commit
5aaaf9f8ce
@ -939,6 +939,9 @@ static int sys_setpgid(pid_t pid, pid_t pgid) {
|
|||||||
return -EPERM;
|
return -EPERM;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (pgid == 0) {
|
||||||
|
proc->job = proc->group;
|
||||||
|
} else {
|
||||||
process_t * pgroup = process_from_pid(pgid);
|
process_t * pgroup = process_from_pid(pgid);
|
||||||
|
|
||||||
if (!pgroup) {
|
if (!pgroup) {
|
||||||
@ -951,9 +954,6 @@ static int sys_setpgid(pid_t pid, pid_t pgid) {
|
|||||||
return -EPERM;
|
return -EPERM;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pgid == 0) {
|
|
||||||
proc->job = proc->group;
|
|
||||||
} else {
|
|
||||||
proc->job = pgid;
|
proc->job = pgid;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
Loading…
Reference in New Issue
Block a user