GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | ||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | ||||||||||||||
GeezerVison is showing github.com — SIGINT is not handled when a short-lived process is run in watch-mode · Issue #51466 · nodejs/node Closed as not planned Closed as not planned Copy link Labels staleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.watch-modeIssues and PRs related to watch mode. DescriptionVersionv20.11.0 PlatformLinux hostname 6.5.7-arch1-1 #\1 SMP PREEMPT_DYNAMIC Tue, 10 Oct 2023 21:10:21 +0000 x86_64 GNU/Linux SubsystemNo response What steps will reproduce the bug?
console.log("short-lived!");
$ node --watch index.js (node:1191877) ExperimentalWarning: Watch mode is an experimental feature and might change at any time (Use `node --trace-warnings ...` to show where the warning was created) short-lived! Completed running 'index.js' After following the above steps, you will no longer be able to terminate the Node.js process in watch-mode with How often does it reproduce? Is there a required condition?If you follow the steps, it will always reproduce. What is the expected behavior? Why is that the expected behavior?A Node.js process in watch-mode will be terminated if we send What do you see instead?$ vim index.js $ cat index.js console.log("short-lived!"); $ node test.js short-lived! $ node --watch index.js (node:1191877) ExperimentalWarning: Watch mode is an experimental feature and might change at any time (Use `node --trace-warnings ...` to show where the warning was created) short-lived! Completed running 'index.js' ^C^C^C^C^C^C I input Ctrl + C but the input is ignored. Additional informationMechanism of this behaviorThe cause of this behavior is the Node.js process in watch-mode triggers a signal handler when it receives SIGINT or SIGTERM. In this signal handler, the node/lib/internal/main/watch_mode.js Line 134 in c25878d
At this time, since the argument node/lib/internal/main/watch_mode.js Lines 74 to 76 in c25878d
As a result, the node/lib/internal/main/watch_mode.js Lines 77 to 79 in c25878d
My proposed modificationsModify the Thank you! Activity
MetadataMetadataAssigneesLabelsstaleIssues and PRs marked stale due to inactivity and scheduled for automatic closure.watch-modeIssues and PRs related to watch mode. TypeProjectsMilestoneRelationshipsDevelopmentIssue actions | ||||||||||||||
| You are visitor 01402775 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |