diff options
| author | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-25 17:50:59 -0600 |
|---|---|---|
| committer | Sean Kurtz <seankurtz75@gmail.com> | 2026-11-25 17:50:59 -0600 |
| commit | 4eba9006c8f36164070690e34e9be10f94d39221 (patch) | |
| tree | fe95f9118c77b38fc06c5ebcc49cd7e1d2dda2cc /src/main.c | |
| parent | 0ebef9da03f1952e8d0189a48cd7b946a7369f4f (diff) | |
| download | zash-perf/fork-fastpath.tar.gz | |
perf: temporary fork-path ablation switchesperf/fork-fastpath
Diffstat (limited to 'src/main.c')
| -rw-r--r-- | src/main.c | 7 |
1 files changed, 5 insertions, 2 deletions
@@ -280,7 +280,9 @@ void exit_shell(int status) { exiting = true; exitstatus = status; jmploc jl; - if (setjmp(jl.buf) == 0) { + if (perf_ablate() & 16) { + /* experiment: skip the EXIT trap */ + } else if (setjmp(jl.buf) == 0) { exc_handler = &jl; trap_run_exit(); } else if (exc_code == EXC_EXIT) { @@ -295,7 +297,8 @@ void exit_shell(int status) { if (!in_subshell && var_get("ZASH_PROCSTAT")) out_printf(&out2, "zash: spawns=%ld forks=%ld\n", stat_spawns, stat_forks); - flush_all(); + if (!(perf_ablate() & 32)) + flush_all(); _exit(code); } |
