Skip to content

How to better kill the nested process tree of spawned processes? #2371

Closed
@bahmutov

Description

@bahmutov

Which problem is this feature request solving?

Our users have noticed that nested backend child processes are not killed when running Cypress end-to-end tests during the build steps. For example, if we start a backend server using npm run develop which starts the gatsby develop process then only the top-level child process is killed (because utils.run is just execa.run which does childProcess.kill via https://nodejs.org/api/child_process.html#child_process_subprocess_kill_signal which does not kill "grand" children.

image

Describe the solution you'd like

It would be nice to kill somehow the entire process tree

Describe alternatives you've considered

Netlify build just shuts down everything, maybe warning about these orphan processes, but does not show it as a dangerous error

Can you submit a pull request?

No.

Metadata

Metadata

Assignees

No one assigned

    Labels

    staletype: featurecode contributing to the implementation of a feature and/or user facing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions