nx/packages
Jack Hsu 7e0719cc0a
fix(core): handle killing child processes of continuous tasks on Windows (#31296)
This PR fixes an issue where running `nx e2e <proj>` on Windows does not
kill the underlying dev/preview server when the e2e task ends.

Repro:
1. `npx create-nx-workspace@latest repro --preset=react-monorepo
--e2eTestRunner=playwright --appName=demo`
2. `cd repro && npx nx e2e demo-e2e`

This will leave the preview server running on port `4300`, and you have
to `netstat -ano | findstr :4300` to find the PID and kill it.

https://www.loom.com/share/fcbea53cdff543a98f4d4c8377027ee0

## Current Behavior
Continuous task does not kill the process correctly once discrete task
ends.

## Expected Behavior
Processes are killed correctly once task is done running.

## Related Issue(s)
<!-- Please link the issue being fixed so it gets closed when this is
merged. -->

Fixes #31235
2025-05-21 13:09:30 -04:00
..