-
Notifications
You must be signed in to change notification settings - Fork 59
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
node app not killed by killer.js #71
Comments
Hi @zontarian Also, note that (according to nodejs docs) windows does not support We can change this behavior, and ask the process to terminate using I don't know how |
Hi @gilamran , setting aside Windows, which of course does not handle signals in general (let alone SIGUSR2), and sticking to unix/mac,
I think that you can implement two solutions:
Anyway at the moment we stick with solution 3 since it does not change your code. Thanks for your reply |
Fixed and published a major version. Thanks for all the help! |
Hello,
we are developing a nest app (inside a docker container). Everything works fine with tsc-watch but when code is being changed, dist is being rebuilt, the node process is not restarted.
The relevant code is
package.json
iswe are using
start:dev
.We have tracked down the problem to the
killer.js
source file issueing aSIGUSR2
signal to node. Our basic node app does not handle this signal so it just ignores the signal, and does not die.Maybe it's because
nest
handlesSIGUSR2
in its own way. We don't know.We have solved the issue in two ways:
killer.js
(killer.js) to havelet KILL_SIGNAL = 'SIGTERM';
process.on('SIGUSR2', () => { process.exit();});
to ourmain.ts
app file.Either way makes the
tsc-watch
work as expectedBut we are wondering why you put SIGUSR instead of SIGTERM, or what are we missing, since nobody seems to have our problem.
Could you help us better understand the basic issue here? Thanks.
Anyway thanks for your work for the node community,
regards
The text was updated successfully, but these errors were encountered: