Fix signal handling when io-thread is disabled