summaryrefslogtreecommitdiffhomepage
path: root/tests/proc/subshell-pure.exp
Commit message (Collapse)AuthorAgeFilesLines
* wip: vi external edit and dot-repeat, in-process cd subshell, perf testSean Kurtz2 days1-1/+1
| | | | | | | | | | | | | | | The working tree the 2026-11-28 review was written against, committed unchanged so the review fixes can sit on top of it. - vi mode: `v` edits the line in $VISUAL, else $EDITOR (edit_external), and `.` repeats the last change, count and all. - `( cd dir )` runs in-process with the directory saved and restored, instead of forking, and its invalidation of the cached logical cwd. - tests/perf: a start-up cost guard; tests/run.sh runs that directory. - README: set +o pipetag for ASCII builds. - formal/zash-spec.txt regenerated as text. - .clang-tidy: two checks re-enabled (no findings after the change). - tests/scripts/webdocs: a `#` inside a fenced block is not a title.
* exec: run a subshell in process when its body cannot change anythingSean Kurtz10 days1-0/+4
A `fork()` copies the address space on z/OS, where a `spawn()` can share it. The subshell row measured 4.7 ms a turn there against 0.3 ms for an external command, and ksh88 does not fork for `( : )` at all. The pipeline stage check already answered the safety question with is_pure(), so a subshell whose body is one output-only builtin with no redirections and no assignments reuses the answer and runs in the shell. Expansion of the arguments is wrapped in the same capture scope a pipeline stage uses, so ${x=1} no longer escapes. Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>