1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Add a hook before fork() for getaddrinfo_a()

We need stop worker threads in getaddrinfo_a() before fork().
This change adds a hook before fork() that cancel all outstanding requests
and wait for all ongoing requests. Then, it waits for all worker
threads to be finished.

Fixes [Bug #17220]
This commit is contained in:
Masaki Matsushita 2020-11-26 16:07:28 +09:00
parent 1cfc6e7b7a
commit 94d49ed31c
5 changed files with 140 additions and 0 deletions

View file

@ -28,6 +28,8 @@
RBIMPL_SYMBOL_EXPORT_BEGIN()
/* process.c */
RUBY_EXTERN void (* rb_socket_before_exec_func)();
void rb_last_status_set(int status, rb_pid_t pid);
VALUE rb_last_status_get(void);
int rb_proc_exec(const char*);