Remove compiler warnings, graceful signal handler thread termination