mirror of
https://github.com/opnsense/src.git
synced 2026-04-26 16:47:30 -04:00
Return ESRCH if the target process is not inferior to the curproc.
Spotted by: HIROSHI OOTA <oota@LSi.nec.co.jp>
This commit is contained in:
parent
e6be967434
commit
2f9325870d
1 changed files with 2 additions and 0 deletions
|
|
@ -470,6 +470,7 @@ setpgid(td, uap)
|
|||
if (!inferior(targp)) {
|
||||
PROC_UNLOCK(targp);
|
||||
sx_sunlock(&proctree_lock);
|
||||
error = ESRCH;
|
||||
goto fail;
|
||||
}
|
||||
sx_sunlock(&proctree_lock);
|
||||
|
|
@ -529,6 +530,7 @@ fail:
|
|||
PGRPSESS_XUNLOCK();
|
||||
|
||||
KASSERT(newpgrp != NULL, ("setpgid failed and newpgrp is null."));
|
||||
KASSERT(error != 0, ("setpgid successfully failed?"));
|
||||
FREE(newpgrp, M_PGRP);
|
||||
|
||||
mtx_unlock(&Giant);
|
||||
|
|
|
|||
Loading…
Reference in a new issue