IvenKoo and morluto
ec17f39e82
fix(process): keep the Darwin helper exit cleanup from crashing the host ( #11714 )
...
fix(process): keep the Darwin helper's exit cleanup from crashing the host
When the macOS ownership helper root cannot be removed while the process
exits — descriptor exhaustion is the recorded case — `cleanupAtExit` let
`rmSync` throw from a `process.once("exit")` listener. Node reports that as
an uncaught error, so a successful command exits 1 and prints a stack for a
directory nobody can retry.
Remove the root best-effort at exit and name the retained root once through a
guarded synchronous write: Node cannot drain a queued stderr chunk from an
exit listener, so the warning uses `writeSync(2, ...)` and swallows a failed
report. The root's normal cleanup path, its retained-cleanup error and every
caller's classification are unchanged; only the exit-time failure stops
changing the exit status.
Verified: `src/process/DarwinHelperExitCleanup.test.ts` asserts the root is
gone after a successful removal with no report, and that a root the process
cannot remove is retained, named once, and does not throw (2 tests). The
permission case is skipped for root and Windows, where permissions do not
prevent removal. `check:fast` passes.
Co-authored-by: morluto <76467478+morluto@users.noreply.github.com >
2026-11-18 11:18:57 -05:00
..
2026-11-16 21:13:43 -05:00
2026-11-16 21:13:43 -05:00
2026-11-16 00:17:15 +08:00
2026-11-06 01:53:53 +08:00
2026-11-16 01:59:03 +08:00
2026-11-16 01:59:03 +08:00
2026-11-16 03:56:10 +08:00
2026-11-15 23:49:11 +08:00
2026-11-15 20:52:58 +08:00
2026-10-27 15:47:08 +08:00
2026-11-14 19:28:38 +08:00
2026-11-15 21:53:53 -05:00
2026-11-15 21:53:53 -05:00
2026-10-24 07:43:49 +08:00
2026-11-14 05:27:07 +08:00
2026-11-16 08:10:08 +08:00
2026-11-15 21:51:18 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 04:27:07 +08:00
2026-11-11 17:39:19 +08:00
2026-11-16 10:59:18 +08:00
2026-10-15 16:54:58 +08:00
2026-11-14 13:21:13 +08:00
2026-11-16 03:56:10 +08:00
2026-11-16 00:04:05 +08:00
2026-11-02 10:59:40 +08:00
2026-10-23 10:39:28 +00:00
2026-11-02 10:59:40 +08:00
2026-10-25 02:44:21 +08:00
2026-11-11 17:42:53 -05:00
2026-11-02 10:59:40 +08:00
2026-11-11 18:37:28 -05:00
2026-11-18 11:18:57 -05:00
2026-11-02 10:59:40 +08:00
2026-11-16 03:56:10 +08:00
2026-10-09 12:45:23 +08:00
2026-11-14 13:21:13 +08:00
2026-11-14 13:21:13 +08:00
2026-11-14 05:27:07 +08:00
2026-10-24 05:05:22 +08:00
2026-10-12 08:59:14 +08:00
2026-11-14 13:21:13 +08:00
2026-11-02 02:13:32 +08:00
2026-11-16 00:39:50 +08:00
2026-11-02 10:59:40 +08:00
2026-11-14 13:21:13 +08:00
2026-11-16 10:59:18 +08:00
2026-11-15 20:06:47 +08:00
2026-11-14 13:21:13 +08:00
2026-11-14 13:21:13 +08:00
2026-10-24 00:27:57 +08:00
2026-11-14 04:08:37 -05:00
2026-11-10 16:50:15 -05:00
2026-11-10 17:03:59 -05:00
2026-10-24 08:22:13 +08:00
2026-11-16 06:28:01 +08:00
2026-11-15 20:52:58 +08:00
2026-11-15 21:53:53 -05:00
2026-11-17 23:02:01 -05:00
2026-11-14 13:21:13 +08:00
2026-11-14 04:08:37 -05:00
2026-10-26 18:14:50 +08:00
2026-11-14 05:27:07 +08:00
2026-11-02 02:13:32 +08:00
2026-11-16 08:42:11 +08:00
2026-11-14 05:27:07 +08:00
2026-11-16 08:04:12 +08:00
2026-10-25 07:31:42 +08:00
2026-11-16 04:27:07 +08:00
2026-11-14 05:36:39 -05:00
2026-11-03 14:47:49 +08:00
2026-11-11 17:39:19 +08:00
2026-11-14 05:27:07 +08:00
2026-11-14 05:27:07 +08:00
2026-11-18 08:20:55 +08:00
2026-11-16 21:13:43 -05:00
2026-11-11 16:37:48 -05:00
2026-11-15 21:22:13 -05:00
2026-11-16 07:33:16 +08:00
2026-11-16 00:04:05 +08:00
2026-11-18 21:49:15 +08:00
2026-11-17 14:16:24 -05:00
2026-10-27 17:13:17 +00:00
2026-11-14 13:21:13 +08:00
2026-10-27 17:13:17 +00:00
2026-11-14 05:27:07 +08:00
2026-11-17 16:34:22 -05:00
2026-11-14 13:21:13 +08:00
2026-11-17 14:16:24 -05:00
2026-11-15 19:35:03 +08:00
2026-11-07 11:12:43 +08:00
2026-10-27 17:13:17 +00:00
2026-10-20 02:01:00 +08:00
2026-10-24 09:57:15 +08:00
2026-11-15 21:53:53 -05:00
2026-11-17 18:48:24 -05:00
2026-11-17 18:48:24 -05:00
2026-11-15 19:35:03 +08:00
2026-11-14 19:28:38 +08:00
2026-11-15 19:35:03 +08:00
2026-11-15 19:35:03 +08:00
2026-10-19 10:52:55 +08:00
2026-11-16 04:49:19 +08:00
2026-11-16 06:28:01 +08:00
2026-11-15 21:53:53 -05:00
2026-10-24 09:57:15 +08:00
2026-11-16 08:06:35 +08:00
2026-11-14 05:27:07 +08:00
2026-11-18 23:05:54 +08:00
2026-11-16 08:06:35 +08:00
2026-10-23 02:25:04 +08:00
2026-11-11 16:37:48 -05:00
2026-10-23 22:13:12 +08:00
2026-11-15 21:53:53 -05:00
2026-10-19 20:04:00 +08:00
2026-10-19 11:37:41 +08:00
2026-11-16 03:56:10 +08:00
2026-11-15 21:53:53 -05:00
2026-11-16 08:24:39 +08:00
2026-11-16 07:56:52 +08:00
2026-10-26 15:41:03 +08:00
2026-10-18 01:03:19 +08:00
2026-11-16 03:16:05 +08:00
2026-11-15 23:51:20 +08:00
2026-11-10 16:44:32 -05:00
2026-10-20 02:01:00 +08:00
2026-11-15 19:35:03 +08:00
2026-11-16 06:38:13 -05:00
2026-11-14 11:48:19 +08:00
2026-10-12 04:44:13 +08:00
2026-10-19 09:14:00 +08:00
2026-11-16 04:49:19 +08:00
2026-11-17 21:02:58 -05:00
2026-11-14 13:21:13 +08:00
2026-11-15 23:49:11 +08:00
2026-11-12 23:58:18 -08:00
2026-11-16 04:49:19 +08:00
2026-11-16 00:39:50 +08:00
2026-11-17 14:16:24 -05:00
2026-11-16 03:56:10 +08:00
2026-11-15 21:53:53 -05:00
2026-10-14 09:47:57 +08:00
2026-11-16 08:45:01 +08:00
2026-11-16 04:49:19 +08:00
2026-11-14 13:21:13 +08:00
2026-11-16 04:27:07 +08:00
2026-11-14 13:21:13 +08:00
2026-11-14 13:21:13 +08:00
2026-10-15 03:43:29 +08:00