GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(server): skip Windows cleanup for exited child processes · Alb11747/t3code@a0b7cb0

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • patches
    • @[email protected]
  • pnpm-lock.yaml
  • pnpm-workspace.yaml
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎patches/@[email protected]‎

Copy file name to clipboard
+60Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
diff --git a/dist/NodeChildProcessSpawner.js b/dist/NodeChildProcessSpawner.js
2+
--- a/dist/NodeChildProcessSpawner.js
3+
+++ b/dist/NodeChildProcessSpawner.js
4+
@@ -44,9 +44,17 @@
5+
return false;
6+
}
7+
};
8+
-const taskkill = (childProcess, onExit = () => {}) => NodeChildProcess.execFile("taskkill", ["/pid", String(childProcess.pid), "/T", "/F"], {
9+
- windowsHide: true
10+
-}, onExit);
11+
+const taskkill = (childProcess, onExit = () => {}) => {
12+
+ // Once Node observes the leader's exit, taskkill /T cannot reclaim orphaned
13+
+ // descendants through its PID, which may be reused. Skip stale-PID cleanup.
14+
+ if (childProcess.exitCode !== null || childProcess.signalCode !== null) {
15+
+ onExit(null);
16+
+ return;
17+
+ }
18+
+ NodeChildProcess.execFile("taskkill", ["/pid", String(childProcess.pid), "/T", "/F"], {
19+
+ windowsHide: true
20+
+ }, onExit);
21+
+};
22+
const make = /*#__PURE__*/Effect.gen(function* () {
23+
const fs = yield* FileSystem.FileSystem;
24+
const path = yield* Path.Path;
25+
diff --git a/src/NodeChildProcessSpawner.ts b/src/NodeChildProcessSpawner.ts
26+
--- a/src/NodeChildProcessSpawner.ts
27+
+++ b/src/NodeChildProcessSpawner.ts
28+
@@ -19,7 +19,9 @@
29+
* `forceKillAfter`, the wait is limited to one second and never escalates.
30+
* With it, cleanup may take the configured duration plus a final one-second
31+
* wait after `SIGKILL`. Zombie descendants can consume either full bound. On
32+
- * Windows, `taskkill` terminates the tree and only the leader's exit is awaited.
33+
+ * Windows, `taskkill` terminates the tree while the leader is running and only
34+
+ * the leader's exit is awaited. Descendants that outlive the leader are not
35+
+ * reclaimed by PID-based cleanup.
36+
*
37+
* POSIX cleanup targets a numeric process-group ID. If the group disappears
38+
* and its ID is reused before cleanup, an unrelated group may be signalled.
39+
@@ -98,13 +100,20 @@
40+
const taskkill = (
41+
childProcess: NodeChildProcess.ChildProcess,
42+
onExit: (error: NodeChildProcess.ExecException | null) => void = () => {}
43+
-) =>
44+
+) => {
45+
+ // Once Node observes the leader's exit, taskkill /T cannot reclaim orphaned
46+
+ // descendants through its PID, which may be reused. Skip stale-PID cleanup.
47+
+ if (childProcess.exitCode !== null || childProcess.signalCode !== null) {
48+
+ onExit(null)
49+
+ return
50+
+ }
51+
NodeChildProcess.execFile(
52+
"taskkill",
53+
["/pid", String(childProcess.pid!), "/T", "/F"],
54+
{ windowsHide: true },
55+
onExit
56+
)
57+
+}
58+
59+
const make = Effect.gen(function*() {
60+
const fs = yield* FileSystem.FileSystem
Collapse file

‎pnpm-lock.yaml‎

Copy file name to clipboardExpand all lines: pnpm-lock.yaml
+4-3Lines changed: 4 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Collapse file

‎pnpm-workspace.yaml‎

Copy file name to clipboardExpand all lines: pnpm-workspace.yaml
+1Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -288,6 +288,7 @@ patchedDependencies:
288288
[email protected]: patches/[email protected]
289289
[email protected]: patches/[email protected]
290290
"@clerk/[email protected]": patches/@[email protected]
291+
"@effect/[email protected]": patches/@[email protected]
291292
"@effect/[email protected]": patches/@[email protected]
292293
"@expo/[email protected]": patches/@[email protected]
293294
[email protected]: patches/[email protected]

0 commit comments

Comments
0 (0)
You are visitor 01402792 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.