Fix segv when libuv call signal handler