-
-
Notifications
You must be signed in to change notification settings - Fork 33.4k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.wontfixIssues that will not be fixed.Issues that will not be fixed.
Description
See this popular question on so https://stackoverflow.com/q/14031763/3748498
By now there is no clean API to do cleanup when node.js exits, in order to catch all situation you need to do following:
for (const event of ["exit", "SIGINT", "SIGUSR1", "SIGUSR2", "uncaughtException", "SIGTERM"]) {
process.on(event, cleanUp)
}
This issue is a place for discussion how to fix it.
My proposal is process.on("shutdown", cleanUp)
.
dr-dimitru, antefix-consulting, varun-manjunath and milancermak
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.processIssues and PRs related to the process subsystem.Issues and PRs related to the process subsystem.wontfixIssues that will not be fixed.Issues that will not be fixed.