Skip to content

terminate tasks gracefully and not forcefully on closing VSCode or when using the "kill" (trashcan) button #206607

@Mutantpenguin

Description

@Mutantpenguin

Does this issue occur when all extensions are disabled?: Yes

  • VS Code Version: 1.87.0 (and all versions before I can remember)
  • OS Version: Ubuntu 22.04.4

Steps to Reproduce:

I am not able to create a real minimal example, but will show my exact usecase here and try to explain it.

  1. create a task with the command bench start from frappe bench (https://github.com/frappe/bench) and run it
    • this starts 3 redis servers, a node server, a yarn watcher and some other stuff
  2. use the "kill" button for the task or close VSCode
  3. bench start got terminated, but all the processes it itself spawned are still running
  4. reopening VSCode and starting the task again will error out, because the still running redis servers are blocking some necessary ports
    • even if it would work, we would still have multiple resource hogging processes lingering in the background

Pressing CTRL-C instead in the tasks terminal gracefully shuts it down and bench start is able to do its proper teardown of all the spawned processes. I am not invested at all in bench so can't answer specific questions to it, but I know that it is using honcho and a Procfile to managing all these processes.

So I guess all I am asking for is a way for tasks to not be forcefully killed, but do the same as CTRL-C in the console would do to it.

This seems to describe that the same functionality already exists for launch.json: microsoft/vscode-js-debug#630 (comment)

Metadata

Metadata

Assignees

Labels

feature-requestRequest for new features or functionalityinsiders-releasedPatch has been released in VS Code Insiderson-testplantasksTask system issues

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions