Release the fork lock when _kern_fork() failed or otherwise we'll
deadlock when trying the next fork(). git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@25600 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
fe8f40adef
commit
d129070196
@ -147,6 +147,7 @@ fork(void)
|
|||||||
thread = _kern_fork();
|
thread = _kern_fork();
|
||||||
if (thread < 0) {
|
if (thread < 0) {
|
||||||
// something went wrong
|
// something went wrong
|
||||||
|
release_sem(sForkLock);
|
||||||
errno = thread;
|
errno = thread;
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user