-
-
Notifications
You must be signed in to change notification settings - Fork 35.5k
Ctrl-c handling in Nodejs #5071
Copy link
Copy link
Closed
Labels
c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.
Metadata
Metadata
Assignees
Labels
c++Issues and PRs that require attention from people who are familiar with C++.Issues and PRs that require attention from people who are familiar with C++.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.
Hi, this query is in the context of applications using node-oracledb and trying control+c (SIGINT). Oracle client registers signal handler for SIGINT and it's logic is just to reset DB connection protocol and nothing more, no exiting the process. Now if there are open connections to Oracle DB in the Nodejs application and user presses control+c, we see that Oracle's signal handler is called continuously and application does not proceed. We also observe that if control+c pressed for the second time then the application exits. Can you please clarify why the signal handler is called continuously with first control+c and the program exits with second control+c? We are guessing that Node's signal handler is calling Oracle client's handler continuously assuming that it should make the program exit. And perhaps the second ctrl+c gives up and forces the program to exit?
Note: This problem is not seen till Node version 0.10.x but started from version 0.12.x onwards.