Avoid calling stdio function calls from within signal handler.