decentraland / editor-sdk7

VSCode extension for Decentraland SDK7 projects
https://marketplace.visualstudio.com/items?itemName=DecentralandFoundation.decentraland-sdk7
MIT License
3 stars 5 forks source link

fix: process leak #30

Closed cazala closed 1 year ago

cazala commented 1 year ago

Fixes https://github.com/decentraland/sdk/issues/677

The issue was that we were not awaiting for the child.kill() method to kill the npm start process, which internally uses the treeKill utility to kill all the child process spawned by the main process (in this case, it was the sdk-commands process spawned by the npm start process).

By not awaiting the promise, the treeKill method could not complete gathering the pids of the child processes, since that is an async procedure in some platforms (on linux it requires executing a ps and in mac a pgrep).