https://github.com/endel/ts-node-graceful-shutdown-issue
Demonstrating issue with graceful shutting down ts-node, using cluster module
https://github.com/endel/ts-node-graceful-shutdown-issue
Last synced: about 1 year ago
JSON representation
Demonstrating issue with graceful shutting down ts-node, using cluster module
- Host: GitHub
- URL: https://github.com/endel/ts-node-graceful-shutdown-issue
- Owner: endel
- Created: 2017-11-04T23:26:02.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-20T18:17:25.000Z (over 8 years ago)
- Last Synced: 2025-02-12T06:21:15.840Z (over 1 year ago)
- Language: JavaScript
- Homepage: https://github.com/TypeStrong/ts-node/issues/519
- Size: 4.88 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# ts-node: issue listening to `SIGINT` using child processes
Whilst issue [457](https://github.com/TypeStrong/ts-node/issues/457) has been fixed on version `4.1.x` of `ts-node`, when using child processes, `ts-node` is still miss-behaving.
I'm using the `cluster` module, and listening for the `SIGINT` signal on the master and child processes.
## `ts-node` behaviour:
SIGINT can be catched only for the master process.
```
$ ./node_modules/.bin/ts-node index.ts
^CShutting down MASTER...
MASTER has been shut down.
```
## `node` behaviour:
SIGINT can be catched for master and child process.
```
$ node index.js
^CShutting down CHILD...
Shutting down MASTER...
CHILD has been shut down.
MASTER has been shut down.
```