Skip to content

graceful shutdown using child processes #519

Closed
@endel

Description

@endel

Whilst issue #457 has been fixed on ts-node@4.1.x, the behaviour is still wrong when using child processes. (cluster module)

I've updated my sample project to demonstrate the issue here: https://github.com/endel/ts-node-graceful-shutdown-issue

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.

Related pull request: #419

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions