|
@ -110,6 +110,7 @@ static struct ev_signal sigterm_watcher; |
|
|
static struct ev_signal sigchld_watcher; |
|
|
static struct ev_signal sigchld_watcher; |
|
|
static struct ev_signal sigusr1_watcher; |
|
|
static struct ev_signal sigusr1_watcher; |
|
|
#else |
|
|
#else |
|
|
|
|
|
#ifndef LIB_ONLY |
|
|
static struct plugin_watcher_t { |
|
|
static struct plugin_watcher_t { |
|
|
ev_io io; |
|
|
ev_io io; |
|
|
SOCKET fd; |
|
|
SOCKET fd; |
|
@ -117,6 +118,7 @@ static struct plugin_watcher_t { |
|
|
int valid; |
|
|
int valid; |
|
|
} plugin_watcher; |
|
|
} plugin_watcher; |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
#endif |
|
|
|
|
|
|
|
|
#ifdef HAVE_SETRLIMIT |
|
|
#ifdef HAVE_SETRLIMIT |
|
|
#ifndef LIB_ONLY |
|
|
#ifndef LIB_ONLY |
|
@ -1323,7 +1325,9 @@ signal_cb(EV_P_ ev_signal *w, int revents) |
|
|
ev_signal_stop(EV_DEFAULT, &sigchld_watcher); |
|
|
ev_signal_stop(EV_DEFAULT, &sigchld_watcher); |
|
|
ev_signal_stop(EV_DEFAULT, &sigusr1_watcher); |
|
|
ev_signal_stop(EV_DEFAULT, &sigusr1_watcher); |
|
|
#else |
|
|
#else |
|
|
|
|
|
#ifndef LIB_ONLY |
|
|
ev_io_stop(EV_DEFAULT, &plugin_watcher.io); |
|
|
ev_io_stop(EV_DEFAULT, &plugin_watcher.io); |
|
|
|
|
|
#endif |
|
|
#endif |
|
|
#endif |
|
|
keep_resolving = 0; |
|
|
keep_resolving = 0; |
|
|
ev_unloop(EV_A_ EVUNLOOP_ALL); |
|
|
ev_unloop(EV_A_ EVUNLOOP_ALL); |
|
@ -1890,6 +1894,10 @@ main(int argc, char **argv) |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#ifdef __MINGW32__ |
|
|
#ifdef __MINGW32__ |
|
|
|
|
|
if (plugin_watcher.valid) { |
|
|
|
|
|
closesocket(plugin_watcher.fd); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
winsock_cleanup(); |
|
|
winsock_cleanup(); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
@ -2039,10 +2047,6 @@ _start_ss_local_server(profile_t profile, ss_local_callback callback, void *udat |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
#ifdef __MINGW32__ |
|
|
#ifdef __MINGW32__ |
|
|
if (plugin_watcher.valid) { |
|
|
|
|
|
closesocket(plugin_watcher.fd); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
winsock_cleanup(); |
|
|
winsock_cleanup(); |
|
|
#endif |
|
|
#endif |
|
|
|
|
|
|
|
|