You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Test stop force-kill and cross-restart paths, including the pid-reuse guard #299
The force-kill path after a failed graceful quit, the cross-restart stop branch, and isRecorderProcess are untested.
Where
src/utils/lifecycle.ts:101-103, 335-336, 342-358
src/utils/sessions.ts:232-241 (isRecorderProcess)
Impact
Covers ffmpeg ignoring "q", stops from another server instance (#182), and the guard against killing an unrelated process that reused a pid. A regression could kill an arbitrary user process or report a stop that never happened.
Suggested fix
Fake child that never exits after "q" with gracefulMs: 50: killPid called, graceful: false
No attached child + live pid of a non-ffmpeg process (e.g. node -e "setInterval(()=>{},1e3)", processImage ffmpeg.exe): not killed, record still finalized
wgc record with live node.exe pid: stop file written, graceful: true on exit
Pid survives killPid (mock isAlive/killPid): throws "is still running"
Activity
TMHSDigital commentedon Nov 10, 2026
Fixed in 6dd716c.
src/__tests__/lifecycleStop.test.tscovers every case on the checklist:graceful: falseisRecorderProcess(process.pid, …)returns true for node.exe and false for ffmpeg.exeThe pid-reuse start-time check (#284) is already in
isOwnRecorder, andsessions.test.tscovers it.