make signal handler thread local