Skip to content

tsserver doesn't shut itself down when the parent process is killed #51100

@rchl

Description

@rchl

Bug Report

When tsserver.js is started as a child process with --useNodeIpc command line switch included and the parent process is killed (with SIGKILL for example), the child process does not shutdown.

I have only tested this on recent 4.8.4 typescript version but I'm assuming that this issue exists since the --useNodeIpc flag was introduced in 4.6.0.

To reproduce this "in the wild" one can start VSCode, open some TS project to trigger typescript service initialization and then kill the parent of the tsserver process which is an extension process:

194655787-e7f1c16f-069e-4bf5-8c7a-6114c55bac19

The tsserver process(es) keep running in the background.

🔎 Search Terms

tsserver ipc

🕗 Version & Regression Information

  • This changed between versions 4.5.5 and 4.6.0

🙁 Actual behavior

The child tsserver process exits after parent process is killed.

🙂 Expected behavior

The child tsserver process keeps running in the background.

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions