etherman-os
2a3dbcaf46
fix(terminal): prevent corrupted session snapshots during init
...
The init snapshot dumped functions with a line-based filter:
declare -f | grep -vE '^_[^_]'
That strips a function's *header* line (e.g. `_foo () `) but leaves the
orphaned `{ ... }` body behind, corrupting the snapshot that is sourced
before every command. Sourcing the torn snapshot runs leftover body code
and breaks subsequent commands (intermittent exit 127).
- Filter private (`_`-prefixed) functions by NAME via `declare -F` and
dump only the wanted whole definitions, so a body is never torn. Guard
against an empty name list (bare `declare -f` dumps everything).
- Treat a non-zero bootstrap exit code as snapshot-init failure, so
execution safely falls back to login-shell-per-command mode.
- Add a regression test asserting snapshot_ready stays false when
bootstrap exits non-zero.
Preserves the atomic-write ($BASHPID temp + mv -f) machinery from #38249 .
2026-06-30 15:51:17 -07:00
..
2026-06-21 13:33:48 -07:00
2026-06-30 02:59:46 -07:00
2026-06-20 11:27:12 -07:00
2026-06-30 15:51:17 -07:00
2026-06-29 01:26:24 -07:00
2026-06-29 01:26:24 -07:00
2026-06-29 01:26:24 -07:00
2026-06-29 01:26:24 -07:00
2026-06-25 22:02:22 -07:00
2026-06-29 04:25:26 -07:00
2026-06-28 12:25:15 -05:00
2026-06-28 13:49:08 -07:00
2026-06-29 02:24:57 -07:00
2026-06-28 02:42:01 -07:00
2026-06-28 14:25:10 -07:00
2026-06-27 15:59:00 -07:00
2026-06-28 13:49:08 -07:00
2026-06-28 12:14:21 -05:00
2026-06-21 15:23:47 -07:00
2026-06-29 10:00:49 -07:00
2026-06-28 02:42:01 -07:00
2026-06-21 07:26:18 -07:00
2026-06-25 22:02:22 -07:00
2026-06-21 17:46:38 +05:30
2026-06-28 04:13:19 -07:00
2026-06-21 16:55:12 -07:00
2026-06-22 06:42:30 -07:00
2026-06-22 18:48:07 -05:00
2026-06-29 15:32:20 +10:00
2026-06-27 04:57:15 +05:30
2026-06-30 09:49:52 +00:00
2026-06-26 01:11:11 -07:00
2026-06-21 13:28:04 +05:30
2026-06-23 23:27:48 -07:00
2026-06-28 14:33:03 -07:00
2026-06-30 03:07:40 -07:00
2026-06-30 03:16:22 -07:00
2026-06-30 03:41:46 -07:00
2026-06-29 11:01:08 +10:00
2026-06-24 15:23:23 +10:00
2026-06-29 11:01:08 +10:00
2026-06-26 19:15:18 -07:00
2026-06-28 02:05:43 -07:00
2026-06-21 12:16:10 -07:00
2026-06-27 19:29:06 -07:00
2026-06-23 03:17:47 +05:30
2026-06-30 02:50:24 -07:00
2026-06-27 04:01:12 +05:30
2026-06-26 20:45:32 +05:30
2026-06-26 01:55:27 +05:30
2026-06-27 20:45:31 -07:00
2026-06-25 12:38:33 -07:00
2026-06-21 12:02:30 -07:00
2026-06-30 14:29:42 -07:00
2026-06-25 09:20:13 +10:00
2026-06-25 13:52:06 -07:00
2026-06-28 01:04:20 +05:30
2026-06-30 04:23:27 -05:00
2026-06-21 16:02:56 +05:30
2026-06-27 04:39:54 -07:00
2026-06-26 00:35:27 -07:00
2026-06-27 04:59:23 +05:30
2026-06-28 04:47:39 -07:00
2026-06-24 00:52:18 +05:30
2026-06-25 23:30:41 +05:30
2026-06-30 20:01:16 +05:30
2026-06-29 11:35:41 +10:00
2026-06-21 11:11:23 -07:00
2026-06-30 04:23:27 -05:00
2026-06-30 17:47:37 +05:30
2026-06-20 23:23:47 -07:00
2026-06-30 03:51:08 -07:00
2026-06-27 04:41:22 -07:00
2026-06-30 15:49:36 -07:00
2026-06-25 22:03:02 -07:00
2026-06-28 21:14:01 -07:00
2026-06-27 21:07:53 -07:00
2026-06-21 16:39:48 -07:00
2026-06-20 23:23:47 -07:00
2026-06-26 12:09:52 +10:00
2026-06-26 12:09:52 +10:00
2026-06-22 15:41:23 +10:00
2026-06-28 01:15:39 -07:00
2026-06-29 11:35:41 +10:00
2026-06-27 19:29:00 -07:00
2026-06-25 23:08:48 +05:30
2026-06-30 02:59:46 -07:00
2026-06-26 15:26:08 +05:30
2026-06-25 23:42:42 +05:30
2026-06-21 13:56:35 -07:00
2026-06-29 21:11:58 -07:00
2026-06-29 21:11:58 -07:00
2026-06-29 21:11:58 -07:00
2026-06-29 01:27:10 -07:00
2026-06-30 00:19:49 -07:00
2026-06-25 01:45:06 +05:30
2026-06-29 10:00:49 -07:00
2026-06-29 10:00:49 -07:00
2026-06-29 10:00:49 -07:00
2026-06-29 10:00:49 -07:00
2026-06-29 10:00:49 -07:00
2026-06-27 04:40:05 -07:00
2026-06-27 03:08:41 +05:30
2026-06-27 15:59:00 -07:00
2026-06-23 03:10:53 +05:30
2026-06-29 21:11:58 -07:00
2026-06-21 11:35:09 -07:00