Vadim Comanescu
1b64a72e25
fix(serve): shut down gracefully on parent death instead of os._exit
...
The parent-death watchdog ended its loop with `os._exit(0)`, which skips
signal handlers and `atexit`. The same serve process installs chaining
SIGTERM/SIGINT handlers that persist in-memory transcripts to state.db
before shutdown (#96095 , `install_exit_flush_signal_handlers`), so the one
exit path that fires when the desktop dies uncleanly was the one path that
bypassed the flush those handlers exist for. It also skipped every `atexit`
hook reachable in a serve process (code kernels, browser tool, LSP, relay).
Raise SIGTERM in-process instead and back it with a daemon timer that
`os._exit(0)`s after a ceiling, the graceful-then-ceiling idiom `cli.py`'s
`_arm_exit_watchdog` already uses. The orphan reap stays guaranteed and
bounded: the ceiling sits past the 5s exit-flush budget and well inside the
old "leaks until killed" behavior. `raise_signal` is used rather than
`os.kill` because it reaches Python's handler on Windows too.
Tests: parent loss now runs this process's SIGTERM handler and takes no
`os._exit`; the ceiling timer is armed as a daemon bounded hard exit.
2026-09-29 19:06:35 -05:00
..
2026-09-28 10:21:41 -07:00
2026-09-29 18:49:58 -05:00
2026-09-29 15:58:55 +05:30
2026-09-29 18:48:37 -05:00
2026-09-29 18:49:58 -05:00
2026-09-24 14:47:06 -04:00
2026-09-28 06:42:00 -07:00
2026-09-29 14:36:55 +05:30
2026-09-29 16:47:48 +05:30
2026-09-25 17:57:38 -05:00
2026-09-23 11:41:01 -04:00
2026-09-29 18:49:58 -05:00
2026-09-27 02:55:39 -07:00
2026-09-21 00:58:39 -04:00
2026-09-28 10:21:41 -07:00
2026-09-22 09:55:47 -04:00
2026-09-24 02:03:59 -04:00
2026-09-29 07:44:13 +00:00
2026-09-28 03:37:09 -07:00
2026-09-21 19:08:19 -04:00
2026-09-23 11:41:01 -04:00
2026-09-24 18:06:48 +05:30
2026-09-28 12:43:03 -07:00
2026-09-28 12:43:03 -07:00
2026-09-29 18:47:44 -05:00
2026-09-27 18:37:01 +05:30
2026-09-20 18:21:34 -07:00
2026-09-20 18:29:22 -07:00
2026-09-21 09:55:40 -07:00
2026-09-29 18:47:44 -05:00
2026-09-26 21:38:28 +05:30
2026-09-28 10:21:41 -07:00
2026-09-20 18:20:44 -07:00
2026-09-29 07:44:13 +00:00
2026-09-25 14:22:12 -04:00
2026-09-28 10:21:41 -07:00
2026-09-24 01:40:31 -04:00
2026-09-28 10:21:41 -07:00
2026-09-25 12:07:32 -05:00
2026-09-28 10:21:41 -07:00
2026-09-27 18:19:17 +05:30
2026-09-29 23:54:34 +05:30
2026-09-24 01:55:51 -04:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-29 23:54:34 +05:30
2026-09-29 23:54:34 +05:30
2026-09-20 13:35:09 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-29 18:33:44 +05:30
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-26 22:19:53 -05:00
2026-09-28 14:16:18 -07:00
2026-09-23 10:05:40 -07:00
2026-09-29 07:44:13 +00:00
2026-09-23 17:09:54 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-29 18:33:44 +05:30
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-25 21:27:06 +05:30
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-29 20:34:45 +05:30
2026-09-29 03:28:46 +05:30
2026-09-23 19:51:34 -04:00
2026-09-28 02:00:41 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 13:08:49 -07:00
2026-09-23 15:05:44 -07:00
2026-09-29 20:34:45 +05:30
2026-09-28 10:21:41 -07:00
2026-09-28 04:04:23 -07:00
2026-09-22 09:55:47 -04:00
2026-09-28 02:00:41 -07:00
2026-09-28 13:30:57 -07:00
2026-09-27 02:33:57 +05:30
2026-09-28 10:21:41 -07:00
2026-09-28 04:44:29 -07:00
2026-09-29 07:51:44 -04:00
2026-09-26 21:43:07 -05:00
2026-09-28 10:21:41 -07:00
2026-09-29 12:16:43 -04:00
2026-09-21 19:08:19 -04:00
2026-09-28 10:21:41 -07:00
2026-09-28 06:42:00 -07:00
2026-09-24 01:55:51 -04:00
2026-09-27 22:04:26 -07:00
2026-09-29 12:16:43 -04:00
2026-09-29 05:59:25 -04:00
2026-09-28 12:23:25 -07:00
2026-09-23 10:42:18 -04:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-29 07:44:13 +00:00
2026-09-27 01:04:39 +05:30
2026-09-21 10:11:19 -07:00
2026-09-28 04:04:23 -07:00
2026-09-28 13:30:57 -07:00
2026-09-23 10:58:15 -07:00
2026-09-28 13:30:57 -07:00
2026-09-23 07:48:32 -07:00
2026-09-21 00:58:39 -04:00
2026-09-27 02:57:28 -07:00
2026-09-29 18:49:58 -05:00
2026-09-21 18:56:56 -04:00
2026-09-29 18:49:58 -05:00
2026-09-29 18:09:20 -05:00
2026-09-29 02:37:33 +05:30
2026-09-28 10:21:41 -07:00
2026-09-28 12:43:03 -07:00
2026-09-28 10:56:47 -05:00
2026-09-28 10:21:41 -07:00
2026-09-28 14:16:18 -07:00
2026-09-27 18:29:18 +05:30
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-27 18:29:18 +05:30
2026-09-20 18:43:59 -07:00
2026-09-22 13:41:11 +05:30
2026-09-28 03:37:09 -07:00
2026-09-28 03:37:09 -07:00
2026-09-23 08:09:47 -07:00
2026-09-23 11:41:01 -04:00
2026-09-28 10:21:41 -07:00
2026-09-21 23:47:51 -07:00
2026-09-28 12:24:52 -05:00
2026-09-28 19:02:20 +05:30
2026-09-25 14:22:12 -04:00
2026-09-25 14:22:12 -04:00
2026-09-21 19:08:19 -04:00
2026-09-28 04:44:29 -07:00
2026-09-25 16:28:14 -05:00
2026-09-29 18:48:37 -05:00
2026-09-28 06:42:00 -07:00
2026-09-24 01:55:51 -04:00
2026-09-29 15:45:52 +05:30
2026-09-28 14:16:18 -07:00
2026-09-29 16:47:48 +05:30
2026-09-23 15:26:34 -04:00
2026-09-28 12:43:03 -07:00
2026-09-28 12:43:03 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-26 17:04:25 -05:00
2026-09-24 11:50:30 -04:00
2026-09-23 07:49:35 -07:00
2026-09-23 10:52:20 -04:00
2026-09-24 14:08:21 -04:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 05:37:55 -07:00
2026-09-21 19:08:19 -04:00
2026-09-28 12:43:03 -07:00
2026-09-28 12:43:03 -07:00
2026-09-28 12:43:03 -07:00
2026-09-29 12:55:46 -07:00
2026-09-29 15:58:55 +05:30
2026-09-29 12:55:46 -07:00
2026-09-24 09:40:41 -04:00
2026-09-29 23:54:34 +05:30
2026-09-22 13:57:51 +05:30
2026-09-23 06:46:02 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-29 18:33:44 +05:30
2026-09-28 10:21:41 -07:00
2026-09-23 09:26:07 +05:30
2026-09-27 17:06:55 -07:00
2026-09-28 10:21:41 -07:00
2026-09-22 05:16:50 -04:00
2026-09-24 02:03:03 -07:00
2026-09-28 12:43:03 -07:00
2026-09-24 05:10:12 -04:00
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-23 12:45:32 +05:30
2026-09-28 14:16:18 -07:00
2026-09-24 14:08:21 -04:00
2026-09-24 11:50:29 -04:00
2026-09-27 06:26:52 -05:00
2026-09-24 11:50:29 -04:00
2026-09-28 12:43:03 -07:00
2026-09-28 10:21:41 -07:00
2026-09-24 11:50:29 -04:00
2026-09-25 21:19:04 +05:30
2026-09-27 01:42:52 +05:30
2026-09-28 12:18:42 -07:00
2026-09-28 09:22:11 -07:00
2026-09-22 01:19:12 -07:00
2026-09-22 17:16:00 +05:30
2026-09-28 14:16:18 -07:00
2026-09-28 14:16:18 -07:00
2026-09-25 14:22:12 -04:00
2026-09-22 05:16:50 -04:00
2026-09-22 05:16:50 -04:00
2026-09-27 01:42:52 +05:30
2026-09-25 14:22:12 -04:00
2026-09-29 15:05:57 -04:00
2026-09-24 16:17:16 -04:00
2026-09-27 06:26:52 -05:00
2026-09-27 21:29:39 -07:00
2026-09-29 02:06:58 +05:30
2026-09-23 05:37:40 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-23 05:37:40 -07:00
2026-09-28 04:04:23 -07:00
2026-09-28 10:21:41 -07:00
2026-09-25 14:25:16 -05:00
2026-09-23 07:36:31 -04:00
2026-09-28 04:59:38 -07:00
2026-09-21 00:58:39 -04:00
2026-09-28 12:43:03 -07:00
2026-09-21 14:02:05 -07:00
2026-09-27 03:41:42 -07:00
2026-09-27 00:56:11 +05:30
2026-09-28 10:21:41 -07:00
2026-09-28 04:44:29 -07:00
2026-09-28 03:34:07 -07:00
2026-09-28 10:21:41 -07:00
2026-09-24 11:50:30 -04:00
2026-09-24 12:30:00 -04:00
2026-09-23 22:22:32 +05:30
2026-09-26 20:40:40 -05:00
2026-09-23 15:43:51 -07:00
2026-09-25 10:46:54 -05:00
2026-09-28 15:54:01 +05:30
2026-09-28 21:03:09 -04:00
2026-09-27 20:49:04 +05:30
2026-09-24 18:08:24 +05:30
2026-09-27 20:49:04 +05:30
2026-09-23 10:43:45 -04:00
2026-09-28 08:33:43 +00:00
2026-09-28 12:43:03 -07:00
2026-09-28 12:33:01 -07:00
2026-09-28 12:43:03 -07:00
2026-09-28 12:43:03 -07:00
2026-09-25 20:00:57 -05:00
2026-09-28 10:21:41 -07:00
2026-09-28 14:16:18 -07:00
2026-09-28 06:42:00 -07:00
2026-09-28 21:02:35 -04:00
2026-09-27 02:54:03 -07:00
2026-09-24 14:23:48 -04:00
2026-09-23 22:05:57 -04:00
2026-09-25 14:22:12 -04:00
2026-09-28 10:21:41 -07:00
2026-09-29 15:28:19 -05:00
2026-09-23 18:29:35 -05:00
2026-09-27 07:43:23 -05:00
2026-09-28 12:33:01 -07:00
2026-09-28 19:02:20 +05:30
2026-09-24 11:12:27 -04:00
2026-09-28 10:21:41 -07:00
2026-09-28 14:16:18 -07:00
2026-09-26 17:09:16 -05:00
2026-09-22 22:24:31 +00:00
2026-09-27 23:53:40 -07:00
2026-09-24 16:17:16 -04:00
2026-09-28 10:21:41 -07:00
2026-09-29 20:34:45 +05:30
2026-09-26 21:00:12 -04:00
2026-09-27 14:09:15 -05:00
2026-09-21 22:02:46 -04:00
2026-09-29 18:49:58 -05:00
2026-09-28 04:44:29 -07:00
2026-09-26 20:07:47 +05:30
2026-09-25 14:22:12 -04:00
2026-09-23 18:48:33 -05:00
2026-09-28 21:04:13 -04:00
2026-09-29 18:49:58 -05:00
2026-09-28 10:21:41 -07:00
2026-09-21 01:57:31 -07:00
2026-09-28 05:33:25 -07:00
2026-09-28 04:44:29 -07:00
2026-09-28 12:43:03 -07:00
2026-09-29 18:49:58 -05:00
2026-09-28 12:43:03 -07:00
2026-09-24 14:08:22 -04:00
2026-09-23 11:41:01 -04:00
2026-09-27 02:57:28 -07:00
2026-09-23 06:51:47 -07:00
2026-09-28 04:44:29 -07:00
2026-09-28 21:04:13 -04:00
2026-09-25 14:22:12 -04:00
2026-09-28 05:33:25 -07:00
2026-09-28 21:02:29 -04:00
2026-09-27 14:09:15 -05:00
2026-09-21 19:32:37 -04:00
2026-09-22 15:55:23 +05:30
2026-09-29 17:05:00 +05:30
2026-09-28 12:43:03 -07:00
2026-09-28 10:21:41 -07:00
2026-09-28 16:23:22 +05:30
2026-09-29 11:40:36 -05:00
2026-09-23 03:25:06 -07:00
2026-09-28 12:33:01 -07:00
2026-09-23 15:26:34 -04:00
2026-09-28 05:37:55 -07:00
2026-09-28 12:18:58 -07:00
2026-09-29 19:06:35 -05:00
2026-09-23 06:46:02 -07:00
2026-09-23 01:16:41 -07:00
2026-09-23 11:41:01 -04:00
2026-09-28 12:18:58 -07:00
2026-09-28 12:18:58 -07:00
2026-09-21 02:56:31 -07:00
2026-09-25 12:09:37 -05:00
2026-09-29 17:13:53 -05:00
2026-09-28 10:21:41 -07:00
2026-09-28 10:21:41 -07:00
2026-09-21 14:13:07 -04:00
2026-09-29 15:24:15 +05:30
2026-09-24 15:38:22 +05:30
2026-09-23 19:51:34 -04:00