-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
nodemon can not be stopped by Ctrl-C with --no-stdin after restart with terminal in raw mode #2143
Comments
This issue impacts use of readline-based interactive apps with |
PSA: To exit |
PSA: Another workaround is to use SIGTERM or SIGINT instead of the default to restart your app, i.e.:
|
This may or may not be related, but sometimes when running my repl app in nodemon, I get a weird behavior where my input is not always registered by my app. Some keystrokes don't reach my app, and some do, randomly and unpredictably. |
This worked for me nodemon see's the app "crashed" on ctrl+c (app exit(0)). This puts nodemon in watch mode to wait for changes before restarting where I can now ctrl+c again to exit nodemon. This works well enough for me as it lets me kill the app without exiting nodemon entirely. |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
idk how long should i bump... |
This issue has been automatically marked as idle and stale because it hasn't had any recent activity. It will be automtically closed if no further activity occurs. If you think this is wrong, or the problem still persists, just pop a reply in the comments and @remy will (try!) to follow up. |
Automatically closing this issue due to lack of activity |
Nice <3 |
nodemon -v
:3.0.1
on Linux
Simplest
test.js
file:command:
nodemon -I test.js
Naturally, while the test script is running,
ctrl-c
does nothing because the terminal is in raw mode. This is not what the issue is about. Instead, the issue is aboutctrl-c
after the test script has exited back tonodemon
and it prints its[nodemon] clean exit - waiting for changes before restart
message.If you wait for the 5 seconds to pass and the process to exit normally,
ctrl-c
will properly interruptnodemon
. This works even if the process is restarted due to code changes, as long as the restarts all happen after the process has exited cleanly, i.e. with at least 5 seconds between them.But if at least once you trigger a restart via a code change while the process is still running, i.e. before the 5 seconds that it waits, you are no longer able to interrupt
nodemon
.The text was updated successfully, but these errors were encountered: