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
2019-03-07 13:23:11 -05:00

Nx - Smart Monorepos · Fast CI

CircleCI License NPM Version Semantic Release Commitizen friendly Join the chat at https://gitter.im/nrwl-nx/community Join the Official Nx Discord Server


Smart Monorepos · Fast CI

Build system, optimized for monorepos, with AI-powered architectural awareness and advanced CI capabilities.

Create a new Nx workspace with

npx create-nx-workspace

...or run

npx nx init

to add Nx to your existing workspace to get faster task scheduling, caching and more. More in the docs.

Learn about CI with Nx Cloud

Nx Cloud connects directly to your existing CI setup, helping you scale your monorepos on CI by leveraging remote caching, task distribution across multiple machines, automated e2e test splitting and automated task flakiness detection

Connect your existing Nx workspace with

npx nx connect

Learn more in the Nx CI docs »

Nx - Smart Monorepos · Fast CI

Want to help?

If you want to file a bug or submit a PR, read up on our guidelines for contributing and watch this video that will help you get started.

Nx - How to contribute video

Core Team

Victor Savkin Jason Jean Benjamin Cabanes Jack Hsu
Victor Savkin Jason Jean Benjamin Cabanes Jack Hsu
vsavkin FrozenPandaz bcabanes jaysoo
James Henry Jon Cammisuli Isaac Mann Juri Strumpflohner
James Henry Jon Cammisuli Isaac Mann Juri Strumpflohner
JamesHenry cammisuli isaacplmann juristr
Philip Fulcher Caleb Ukle Katerina Skroumpelou Colum Ferry
Philip Fulcher Caleb Ukle Katerina Skroumpelou Colum Ferry
philipjfulcher barbados-clemens mandarini Coly010
Emily Xiong Miroslav Jonaš Leosvel Pérez Espinosa Zachary DeRose
Emily Xiong Miroslav Jonaš Leosvel Pérez Espinosa Zachary DeRose
xiongemi meeroslav leosvelperez ZackDeRose
Craigory Coppola Chau Tran Nicholas Cunningham Max Kless
Craigory Coppola Chau Tran Nicholas Cunningham Max Kless
AgentEnder nartc ndcunningham MaxKless
Description
No description provided
Readme 619 MiB
Languages
TypeScript 95%
Rust 2.9%
JavaScript 1.3%
Kotlin 0.3%
MDX 0.3%
Other 0.1%