Implement separate readline process; Make sighandler async-safe