Skip to content

Test: gracefully killing terminal processes #249671

Closed
@meganrogge

Description

@meganrogge

Refs #206607

Complexity: 4

Create Issue


We’ve added an opt-in setting, terminal.integrated.killGracefully, to cleanly shut down terminal processes, including child processes. This helps avoid orphaned processes, frees up ports, and can reduce the risk of resource leaks.

  • To begin, have that setting disabled
  • Open a repo with a task or terminal command that uses a port (see example below)
  • Run that task or command in the terminal
  • Click the trash can to kill the terminal or close VS Code.
  • Reopen that repo and rerun the command or task.
  • You'll see an error about address in use.
  • List all processes using that port (3000 or whatever yours is using): lsof -i :3000
  • Run kill -9 PID
  • Enable the setting.
  • Repeat the above steps. You should not encounter an error - it should run successfully.

Example:

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions