maleck13 / readline

read line module for node js
93 stars 27 forks source link

Avoid "close" event. #20

Open marian-toaderr opened 8 years ago

marian-toaderr commented 8 years ago

I'm developing a console application using your library. For this application I'm trying to develop I need to block the user inside my shell. So I need to disable all events like ctrl+c, ctrl+d, etc. I succeded blocking ctrl+c and ctrl+z events, but I'm struggling with ctrl+d. This started a EOF signal/event that closes the stream. If i handle the "close" event I can catch this, but the stream will still be closed. I need my application to avoid closing the stream or restarting it after "close" event. Is this possible to achieve to do with your library? Thanks in advance :)