summaryrefslogtreecommitdiffhomepage
path: root/src/exec.h
diff options
context:
space:
mode:
authorSean Kurtz <seankurtz75@gmail.com>2026-11-25 18:53:39 -0600
committerSean Kurtz <seankurtz75@gmail.com>2026-11-25 18:53:39 -0600
commit93bbcf2f9a75bb5090d96ec9908594e15aa5908b (patch)
tree5069e98a1caee726174588d3522d4e85e5cbc353 /src/exec.h
parentfd782a60f3993d6ec302de669ceefbdacbf1f97a (diff)
downloadzash-perf/cd-inproc.tar.gz
perf: restore cwd after a lone ( cd dir ) in-processperf/cd-inproc
A subshell whose body is a single cd now runs in the parent shell with the directory, PWD, OLDPWD and curdir saved and restored, instead of forking. On z/OS a fork costs ~0.4 ms there; the cd itself costs ~5 us. A readonly, integer or dynamic PWD/OLDPWD keeps the forked path.
Diffstat (limited to 'src/exec.h')
-rw-r--r--src/exec.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/exec.h b/src/exec.h
index 432a32c..43af437 100644
--- a/src/exec.h
+++ b/src/exec.h
@@ -110,7 +110,7 @@ enum {
};
void find_command(const char *name, cmdinfo *ci, unsigned flags);
-bool builtin_cd_isolated(int argc, char **argv, int *status);
+void builtin_cd_isolated(int argc, char **argv, int *status);
void func_define(const char *name, node *body, arena *owner);
bool func_unset(const char *name);
void func_each(void (*fn)(const char *name, void *arg), void *arg);