Skip to content

child process living despite of parent process interrupted. #509

Closed
@johnny-mh

Description

@johnny-mh

When i interrupt below typescript code by press Ctrl+C

Spawned child process living despite of parent process interrupted.

// test.ts
import {spawn} from 'child_process';
spawn('npx', ['ng', 'serve'], {stdio: 'inherit'});

I tested ts-node v4.1.0, node v8.9.1, typescript v2.4.2 environment.

I tested same code with native javascript and execute by node command with below code

Child process killed successfully after parent process interrupted.

// test.js
require('child_process').spawn('npx', ['ng', 'serve'], {stdio: 'inherit'});

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