Skip to content

Fix dangling process when terminating a long running process with SIGTERM#72

Merged
Cammisuli merged 2 commits intoCammisuli:mainfrom
pulasthibandara:bug/dangling-process-on-sigterm
Feb 21, 2025
Merged

Fix dangling process when terminating a long running process with SIGTERM#72
Cammisuli merged 2 commits intoCammisuli:mainfrom
pulasthibandara:bug/dangling-process-on-sigterm

Conversation

@pulasthibandara
Copy link
Contributor

Issue

For long running processes like a web server, the plugin sometimes fails to terminate the running child-process.

Fix: detached: false

As the stdio is inherited, the running console is attached anyway, and detached: false should have no impact other than explicitly binding the lifetime of the child-process to it's parent. https://nodejs.org/api/child_process.html#optionsdetached

@pulasthibandara pulasthibandara changed the title Fix dangling process when terminating a long running process with SIG… Fix dangling process when terminating a long running process with SIGTERM Jan 13, 2025
@nx-cloud
Copy link

nx-cloud bot commented Jan 13, 2025

View your CI Pipeline Execution ↗ for commit d171524.

Command Status Duration Result
nx run-many --target=e2e --exclude monodon --pa... ✅ Succeeded 1m 36s View ↗
nx run-many --target=build,test,lint --exclude ... ✅ Succeeded 11s View ↗

☁️ Nx Cloud last updated this comment at 2025-02-21 03:10:48 UTC

@Cammisuli Cammisuli enabled auto-merge (squash) February 21, 2025 03:08
@Cammisuli Cammisuli merged commit f4ae25e into Cammisuli:main Feb 21, 2025
3 checks passed
Cammisuli added a commit that referenced this pull request Feb 21, 2025
…ss with SIGTERM (#72)

Co-authored-by: Jonathan Cammisuli <4332460+Cammisuli@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants