-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SIGINT captured #789
Comments
Are you suggesting we change |
It's not so much |
@sumarlidason what is the issue? I also see ctrl+c don't work with inquirer any more. Is there any good solution? |
@shirshak55 I don't have access to the affected code any more and cannot remember anymore than what is in this issue. Do you have a concise code sample you can share with the problem? |
used only
now Ctrl + C is not working on other application lol. especially on express server SIGINT disappears somewhere. And when i remove the above code ctrl +c works. |
Possibly Related #293
We experienced issues with promises + subprocesses inside the inquirer promise chain when sending SIGINT to the process. Removing the
prompt
from the process and hardcodedanswers
resolved the issue. We did some research into what could still be listening for SIGINT fromprocess
and found thatcli-cursor
usesrestore-cursor
which usessignal-exit
. In testing I found that signal-exit's listeners were not being called while sending ctrl-c. Clearing the listeners manually(process.removeAllListeners('SIGINT');
) after receivinganswers
fromprompt
resolved the issue. We also noticed the event listeners only lingered while usinglist
question type. Here is a sandbox we were testing with:The text was updated successfully, but these errors were encountered: