replace old style signal handling with libevent signal handling