diff options
author | Masaki Matsushita <[email protected]> | 2020-11-26 16:07:28 +0900 |
---|---|---|
committer | Masaki Matsushita <[email protected]> | 2020-12-04 23:31:51 +0900 |
commit | 94d49ed31c39002335eeee65d42463139f561954 (patch) | |
tree | 86ca5d184fb8e52540664ec8b087bdb93a2e0c5b /include | |
parent | 1cfc6e7b7a92c1a624182392ba702d3dcb2eba98 (diff) |
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]
Diffstat (limited to 'include')
-rw-r--r-- | include/ruby/internal/intern/process.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/ruby/internal/intern/process.h b/include/ruby/internal/intern/process.h index 2b1005a205..5cc0ca242e 100644 --- a/include/ruby/internal/intern/process.h +++ b/include/ruby/internal/intern/process.h @@ -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*); |