mirror of
https://github.com/ruby/ruby.git
synced 2025-08-15 13:39:04 +02:00
Fix bug at fork on FreeBSD
The main thread in a forked process appears not to own the read-write lock.
This commit is contained in:
parent
d9f6e326ad
commit
dc8c382266
Notes:
git
2024-09-19 09:13:39 +00:00
1 changed files with 7 additions and 1 deletions
|
@ -4234,7 +4234,13 @@ rb_fork_ruby(int *status)
|
|||
child.error = err = errno;
|
||||
|
||||
disable_child_handler_fork_parent(&old); /* yes, bad name */
|
||||
rb_thread_release_fork_lock();
|
||||
if (
|
||||
#if defined(__FreeBSD__)
|
||||
pid != 0 &&
|
||||
#endif
|
||||
true) {
|
||||
rb_thread_release_fork_lock();
|
||||
}
|
||||
if (pid == 0) {
|
||||
rb_thread_reset_fork_lock();
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue