diff options
author | Masaki Matsushita <glass.saga@gmail.com> | 2020-12-06 01:16:33 +0900 |
---|---|---|
committer | Masaki Matsushita <glass.saga@gmail.com> | 2020-12-06 01:32:43 +0900 |
commit | 76439eee68d2f1e56ac7a6ab38aceacf0b4b40c8 (patch) | |
tree | aaf937f3916e0db6ef96bd24dc9e4d4358caf4eb /ext/socket | |
parent | a38d4473564c5620d272305e91c4133f08034138 (diff) |
Call cleanup function for getaddrinfo_a(3) only before fork()
Previously, rb_getaddrinfo_a_before_exec() is called from before_exec().
However, the function needs to be called only before fork().
The change moves it to before_fork().
Diffstat (limited to 'ext/socket')
-rw-r--r-- | ext/socket/raddrinfo.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/socket/raddrinfo.c b/ext/socket/raddrinfo.c index 249ce035fd..c0cc0f37ea 100644 --- a/ext/socket/raddrinfo.c +++ b/ext/socket/raddrinfo.c @@ -442,7 +442,7 @@ gaicbs_wait_all(void) It cancels all outstanding requests and waits for ongoing requests. Then, it waits internal worker threads in getaddrinfo_a(3) to be finished. */ void -rb_getaddrinfo_a_before_exec(void) +rb_getaddrinfo_a_before_fork(void) { gaicbs_cancel_all(); gaicbs_wait_all(); @@ -2875,6 +2875,6 @@ rsock_init_addrinfo(void) rb_define_method(rb_cAddrinfo, "marshal_load", addrinfo_mload, 1); #ifdef HAVE_GETADDRINFO_A - rb_socket_before_exec_func = rb_getaddrinfo_a_before_exec; + rb_socket_before_fork_func = rb_getaddrinfo_a_before_fork; #endif } |