Expand description
exec submodule.
Faithful Rust ports of free functions and file-static globals from
Src/exec.c. The wordcode-VM dispatch tree (execlist / execpline
/ execcmd / execsimple etc.) that drives execution in C zsh is
NOT replicated here — zshrs runs the fusevm bytecode VM instead
(see src/vm_helper.rs + src/fusevm_bridge.rs).
What lives here are the parts of Src/exec.c that ARE faithful
ports and don’t depend on the C-side wordcode walker:
trap_state/trap_return/forklevel— file-static integer globals fromSrc/exec.c:134 / :155 / :1052, exposed as atomics shared between this module,Src/signals.c’s port atsrc/ported/signals.rs, andSrc/params.c’s port atsrc/ported/params.rs.gethere(Src/exec.c:4573) — turn a here-document into a here-string. Called from the lexer port (src/ported/lex.rs).getoutput(Src/exec.c:4712) — command-substitution body runner. Called from the parameter-expansion port (src/ported/subst.rs).loadautofn+getfpfunc(Src/exec.c:5050/:5260) —$fpathwalker + autoload file installer. Called frombin_autoload/bin_functions -cinsrc/ported/builtin.rs.resolvebuiltin(Src/exec.c:2703) — module-autoload guard used by the dispatch walk inexeccmd_exec.execcmd_compile_head— fusevm-bytecode-time head resolver mirroring the head section (c:2904-3275) of C’sexeccmd_exec. NOT a faithful port; the canonical 7-argexeccmd_execport lives alongside it.execcmd_exec(Src/exec.c:2900) — canonical 7-arg port of the C function (locals + dispatch walk through builtin/shfunc/external invocation). Used by future tree-walker callers; the fusevm bytecode flow goes throughexeccmd_compile_headinstead.
Modules§
- esub
- Port of
enum { ESUB_ASYNC, ESUB_PGRP, ... };fromSrc/exec.c:1056. Flag bits forentersubsh(int flags, struct entersubsh_ret *retp).
Structs§
- entersubsh_
ret - Port of
struct entersubsh_retfromSrc/exec.c(forward decl). Out-arg used byentersubsh()to hand back the group-leader pid and the list-pipe job index the parent should track. Only filled in forESUB_PGRP+ non-async forks (synchronous pipeline child groups). - execcmd_
dispatch - Dispatch decision returned by
execcmd_compile_head— the fusevm-bytecode-time head resolver that mirrors the local-variable state the Cexeccmd_execfunction carries throughc:2913-2916(is_builtin,is_shfunc,cflags,use_defpath) plus the precmd-modifier strip count. The fusevm bytecode compiler reads this to emit the correct dispatch opcode insrc/extensions/compile_zsh.rs::compile_simple.
Constants§
- ADDVAR_
EXPORT - Port of the anonymous
enum { ... }fromSrc/exec.c:35-40. Flag bits passed as theaddflagsargument toaddvars/addvarsfromargs: - ADDVAR_
RESTORE ADDVAR_RESTOREconstant.- ANONYMOUS_
FUNCTION_ NAME - Port of
static const char *const ANONYMOUS_FUNCTION_NAME = "(anon)";fromSrc/exec.c:5289. Anonymous-function name marker used byis_anonymous_function_name,execfuncdef, anddoshfuncfor() { ... }anonymous function dispatch. - POUNDBANGLIMIT
POUNDBANGLIMITfromSrc/exec.c:500— max bytes read from the front of a script when probing for a#!shebang line.
Statics§
- DONETRAP
- Port of
static int donetrap;fromSrc/exec.c:1351. Tracks whether the ZERR trap has already fired for the current sublist. C source resets to 0 at sublist start (c:1455) and sets to 1 afterdotrap(SIGZERR)(c:1602). The checkif (!this_noerrexit && !donetrap && !this_donetrap)at c:1598 suppresses re-firing within the same sublist AND, crucially, carries the “already fired” state across a function-call return boundary so the outer caller’s post-command check doesn’t fire ZERR a second time for the same logical error. Bug #303 in docs/BUGS.md. - FORKLEVEL
- Port of
int forklevel;fromSrc/exec.c:1052. Records thelocallevelat the most recent fork point (set at c:1221:forklevel = locallevel;insideentersubsh()). Used by: - LIST_
PIPE_ TEXT - Port of
mod_export int noerrs;fromSrc/exec.c:117. When non-zero, suppresszerr()output (lex error reporting duringparse_string,parseoptsetc.). Saved/restored byexecsave/execrestore. Port ofstatic char list_pipe_text[JOBTEXTSIZE]fromSrc/exec.c:463. Holds the textual rendering of the in-flight pipe list; saved across nested execlist invocations at exec.c:1372-1380 (zeroed on entry, restored fromold_list_pipe_textat c:1634-1638) and round-tripped through execsave/execrestore (c:6448 / c:6484). zshrs models it as a length-bounded String guarded by a Mutex — the Cchar[80]cap is a buffer-overflow guard, but matching length matters for thejobsbuiltin’s pipe-list rendering. - STTYval
- Port of
static char *STTYval;fromSrc/exec.c:263. Pendingsttyargument string captured byaddvarswhen the command’s inline env containsSTTY=.... Applied byexecutebefore fork - TRAP_
RETURN - Port of
int trap_return;fromSrc/exec.c:155. Carries the pending exit status from inside a trap; sentinel-2means “running an EXIT/DEBUG-style trap at the current level” (signals.c:1166). Promoted to the user’sreturn Nvalue bybin_returnwhen POSIX-trap semantics apply (builtin.c:5852). - TRAP_
STATE - Port of
int trap_state;fromSrc/exec.c:134. Tracks whether a trap handler is currently being processed and, paired withTRAP_RETURNbelow, whether areturninside the trap should promote toTRAP_STATE_FORCE_RETURNto unwind the trap caller. - cmdoutpid
- Port of
pid_t cmdoutpid;fromSrc/exec.c:215. Pid of the most recent$(cmd)command-substitution child. Used by exit-status propagation:cmdoutvalcarries the exit;cmdoutpidcarries the pidwaitpid-d for it. - cmdoutval
- Port of
int cmdoutval;fromSrc/exec.c:225. Exit status of the most recent$(cmd). Drives$?when a varspc-only command runs alongside a substitution. - doneps4
- Port of
static int doneps4;fromSrc/exec.c:262. Set afterprintprompt4has emitted the$PS4prefix for the current xtrace command — prevents double-printing when an inner sub-eval also wants to xtrace. - esglob
- esprefork
- Port of
static int esprefork, esglob = 1;fromSrc/exec.c:2680. - exstack
- Port of
struct execstack *exstack;fromSrc/exec.c:244. Head of the linked exec-context save stack —execsavepushes a frame before signal-handler / trap dispatch;execrestorepops it afterwards so the interrupted command resumes with its state intact. - list_
pipe - Port of
int list_pipe = 0;fromSrc/exec.c:457. Set when the currently-executing pipeline is the long-running pipe-into-loop shape (cat foo | while read a; do ... done) — drives the super/sub-job tracking documented in the famousAllen Edeln…comment block above this declaration in C. - list_
pipe_ child - Port of
static int list_pipe_child = 0;fromSrc/exec.c:462. Set in the child after the list_pipe fork so the child knows to continue executing the loop body (vs the parent which records the pid + returns). - list_
pipe_ job - Port of
static int list_pipe_job;fromSrc/exec.c:462. Job table index of the pipeline’s first-stage job (thecatincat foo | while ...). - list_
pipe_ pid - Port of
static pid_t list_pipe_pid;fromSrc/exec.c:459. PID of the sub-shell created to host the loop-after-pipe pattern; passed up the recursiveexecliststack so the cat-job’s super- job entry can record it. - noerrexit
- Port of
int noerrexit;fromSrc/exec.c:72. Bit-flags that suppress ERREXIT triggering on the next command(s). Bits:NOERREXIT_EXIT(inif/while/untiltest contexts),NOERREXIT_RETURN(afterreturn),NOERREXIT_UNTIL_EXEC(until next exec’d command). Bucket-1 — per-evaluator (each recursive eval has its own suppression frame). - noerrs
- nohistsave
- Port of
int nohistsave;fromSrc/exec.c:122. When non-zero,addhistnodeno-ops so trap firings /evalinvocations don’t pollute$HISTCMD. Tracked alongsidenoerrsin the trap path. - nowait
- Port of
static int nowait;fromSrc/exec.c:461. When set,execplinedoesn’t wait for the pipeline; used during the list_pipe sub-shell fork bookkeeping. - pline_
level - Port of
int pline_level = 0;fromSrc/exec.c:461. Recursive pipeline depth (counts nested pipelines within the currentexeclistcall chain). - procsubstpid
- Port of
mod_export pid_t procsubstpid;fromSrc/exec.c:220. Pid of the most recent process-substitution child (<(cmd)/>(cmd)). Tracked separately fromcmdoutpidbecause procsubst jobs aren’t wait-collected by the parent until the fd is closed. - retflag
- Port of
mod_export volatile int retflag;fromSrc/exec.c:165. Set bybin_returnto unwind the function-call stack. Cleared byrunshfuncon entry, checked byexeclist’s main loop. - sfcontext
- Port of
mod_export int sfcontext;fromSrc/exec.c:239. Source context — one ofSFC_NONE,SFC_DIRECT(user typed it),SFC_SIGNAL(trap firing),SFC_HOOK(precmd/preexec etc.),SFC_WIDGET(ZLE widget),SFC_COMPLETE(completion fn),SFC_CFUNC(compsys fn),SFC_SUBST($(…) cmd-subst),SFC_EVAL(eval body). Read byzerr()/funcstackbuilding. - simple_
pline - Port of
int simple_pline = 0;fromSrc/exec.c:457. Set during dispatch of a “simple” pipeline (single-stage / no shell-construct tail) so thelist_pipemachinery short-circuits. - subsh
- Port of
int subsh;fromSrc/exec.c:160. Subshell depth — bumped every timeentersubshforks a sub-shell, used by signal handling (different SIGINT semantics in subshells) and by${$$}($$stays at the top-level pid). - this_
noerrexit - Port of
int this_noerrexit;fromSrc/exec.c:109. When set, suppress ERREXIT for THIS one command only (consumed + cleared before the next command starts). Set byexeccurshand the((expr))arith path so a 0-result doesn’t trigger errexit. - use_
cmdoutval - Port of
int use_cmdoutval;fromSrc/exec.c:234. When set,lastvalis updated fromcmdoutvalafter the command (i.e. the command had substitutions whose exit status matters). - zsh_
eval_ context - Port of
char **zsh_eval_context;fromSrc/exec.c(zsh.export:355). Stack of"context"labels used byeval-style nested execution:bin_dot,bin_eval,execode, autoloads. Eachexecode(prog, ..., "context")pushes its label and pops on return. - zsh_
subshell - Port of
mod_export int zsh_subshell;fromSrc/init.c:67. Visible$ZSH_SUBSHELLparameter — incremented byentersubsh()each time the shell forks into a subshell (real or fake-exec). Distinct fromsubshwhich records whether we ARE a subshell;zsh_subshellis the visible depth count.
Functions§
- addfd
- Port of
static void addfd(int forked, int *save, struct multio **mfds, int fd1, int fd2, int rflag, char *varid)fromSrc/exec.c:2397. - cancd
- Port of
char *cancd(char *s)fromSrc/exec.c:6370. - cancd2
- Port of
static int cancd2(char *s)fromSrc/exec.c:6411. - checkclobberparam
- Port of
static int checkclobberparam(struct redir *f)fromSrc/exec.c:2178. - clobber_
open - Port of
static int clobber_open(struct redir *f)fromSrc/exec.c:2221. - closeallelse
- Port of
static void closeallelse(struct multio *mn)fromSrc/exec.c:2358. - closem
- Port of
mod_export void closem(int how, int all)fromSrc/exec.c:4546. - closemn
- Port of
static void closemn(struct multio **mfds, int fd, int type)fromSrc/exec.c:2273. - closemnodes
- Port of
static void closemnodes(struct multio **mfds)fromSrc/exec.c:2344. - commandnotfound
- Port of
int commandnotfound(char *arg0, LinkList args)fromSrc/exec.c:669. - doshfunc
- Port of
int doshfunc(Shfunc shfunc, LinkList doshargs, int noreturnval)fromSrc/exec.c:5823-6158. - entersubsh
- Port of
static void entersubsh(int flags, struct entersubsh_ret *retp)fromSrc/exec.c:1083. Called by every child fork to switch the process into subshell mode: traps reset, monitor disabled, signals re-defaulted, pgrp + tty handed off, saved fds closed, jobtab cleared, ZSH_SUBSHELL bumped, forklevel = locallevel. - execarith
- Port of
execarith(Estate state, UNUSED(int do_exec))fromSrc/exec.c:5237-5275. Run a(( ... ))arithmetic command; returns 0 when val != 0 (success), 1 when val == 0 (false), 2 on parse error. - execautofn
- Port of
static int execautofn(Estate state, UNUSED(int do_exec))fromSrc/exec.c:5635-5644. The autoload-aware dispatch entry forWC_AUTOFN: fault the function body in vialoadautofn, then hand off toexecautofn_basicto actually run it. - execautofn_
basic - Port of
execautofn_basic(Estate state, UNUSED(int do_exec))fromSrc/exec.c:5608-5630. Run a pre-loaded autoload function body viaexecode, snapshottingscriptname/scriptfilenamearound the call so%N/%xreflect the autoload target during execution. - execcase
- Port of
execcase(Estate state, int do_exec)fromSrc/loop.c:600-733.case word in pat) body ;; ... esacwith;;/;&/;|separators. - execcmd_
analyse - Port of
execcmd_analyse(Estate state, Execcmd_params eparams)fromSrc/exec.c:2733-2785. Pre-execcmd_exec analysis pass: walks the wordcode atstate->pc, splits out redirs/varspc/args without expanding (no prefork, no globbing), and fillseparamsso the caller (execcmd_exec at c:2901 or execpline2 at c:2013) can branch on the command type before the real work. - execcmd_
compile_ head - !!! NOT A PORT OF C
execcmd_exec!!! - execcmd_
exec - Port of
execcmd_exec(Estate state, Execcmd_params eparams, int input, int output, int how, int last1, int close_if_forked)fromSrc/exec.c:2900-4404. Execute a command at the lowest level of the hierarchy. - execcmd_
fork - Port of
execcmd_fork(Estate state, int how, int type, Wordcode varspc, LinkList *filelistp, char *text, int oautocont, int close_if_forked)fromSrc/exec.c:2810-2893. - execcmd_
getargs - Port of
execcmd_getargs(LinkList preargs, LinkList args, int expand)fromSrc/exec.c:2791-2806. Transfer the first node ofargstopreargs, performingprefork(singleton-list expansion) on the way ifexpandis set. Used byexeccmd_execto pull the command head one word at a time so prefix-modifier walking (BINF_COMMAND, BINF_EXEC etc.) sees expanded names. - execcond
- Port of
execcond(Estate state, UNUSED(int do_exec))fromSrc/exec.c:5204-5232. Run a[[ ... ]]cond expression. - execcursh
- Port of
execcursh(Estate state, int do_exec)fromSrc/exec.c:469-498. Execute a{ ... }current-shell command group: skip the trailing try-only word, optionally drop a stale job slot, then run the inner list. - execfor
- Port of
execfor(Estate state, int do_exec)fromSrc/loop.c:50-202.for var in args; do body; doneand the C-stylefor ((init;cond;adv))variant. WC_FOR_TYPE distinguishes PPARAM (use $@) / LIST (explicit words) / COND (C-style). - execfuncdef
- Port of
execfuncdef(Estate state, Eprog redir_prog)fromSrc/exec.c:5309-5494. Define a shell function: extract name(s)+body from the wordcode payload, allocate the Shfunc, install intoshfunctab(named), or execute immediately (anon). - execif
- Port of
execif(Estate state, int do_exec)fromSrc/loop.c:553-598.if cond; then body; elif ...; else ...; fi. - execlist
- Port of
execlist(Estate state, int dont_change_job, int exiting)fromSrc/exec.c:1349-1665. Walks WC_LIST entries, dispatches each sublist (WC_SUBLIST chain inlined per c:1525-1625, same as C — there’s no separate execsublist function), handles signal-trap dispatch + ERREXIT propagation. - execode
- Port of
void execode(Eprog p, int dont_change_job, int exiting, char *context)fromSrc/exec.c:1245-1282. Set up anestatearound the given Eprog and runexeclist. Maintains thezsh_eval_contextstack so$ZSH_EVAL_CONTEXTreflects the call chain. - execpline
- Port of
execpline(Estate state, wordcode slcode, int how, int last1)fromSrc/exec.c:1668-1942. Walks the WC_PIPE chain, sets up pipes/fork between stages, handles Z_TIMED / Z_ASYNC. - execpline2
- Port of
execpline2(Estate state, wordcode pcode, int how, int input, int output, int last1)fromSrc/exec.c:1989-2040. Recursive multi-stage pipe walker: at each step, analyse the current command, fork-into-pipe (if mid-pipeline) or exec directly (if WC_PIPE_END), then recurse on the next stage withpipes[0]as its input fd. - execrepeat
- Port of
execrepeat(Estate state, UNUSED(int do_exec))fromSrc/loop.c:499-551.repeat N; do body; done. - execrestore
- Port of
void execrestore(void)fromSrc/exec.c:6470. - execsave
- Port of
void execsave(void)fromSrc/exec.c:6438. - execselect
- Port of
execselect(Estate state, UNUSED(int do_exec))fromSrc/loop.c:217-410.select var in words; do body; doneREPL. - execshfunc
execshfunc(Shfunc shf, LinkList args)—Src/exec.c:5540. Promoted to top-level pub fn so execcmd_exec at the shfunc dispatch site (c:4102-4105) can route through it. The real port owns queue_signals + cmdstack + sfcontext setup before calling doshfunc; doshfunc itself is unported, so we route the body throughrunshfunc(exec.rs:1700), which carries the wrapper-chain + zunderscore restore. Degraded vs C (no cmdstack push, no sfcontext flip, no XTRACE arg-trace) but the function body executes andlastvalis updated.- execsimple
- Port of
execsimple(Estate state)fromSrc/exec.c:1290-1340. Fast-path for single-Simple commands that bypasses the fullexeccmd_execmachinery. - execstring
- Port of
void execstring(char *s, int dont_change_job, int exiting, char *context)fromSrc/exec.c:1228. - exectime
- Port of
exectime(Estate state, UNUSED(int do_exec))fromSrc/exec.c:5279-5294. Runtime pipeline: drives execpline with the Z_TIMED|Z_SYNC flags so it tracks wall/user/sys time. - exectry
- Port of
exectry(Estate state, int do_exec)fromSrc/loop.c:735-798.{ try } always { finally }: capture errflag/retflag/breaks/contflag from the try-clause, reset them around the always-clause, then restore if always-clause didn’t override. - execute
- Port of
static void execute(LinkList args, int flags, int defpath)fromSrc/exec.c:723. The canonical “child runs the simple external command” path: STTY/ARGV0/BINF_DASH handling, makecline, closem(FDT_XTRACE) + child_unblock, slash-path direct exec, defpath (command -p) search, cmdnamtab + $PATH walk, with commandnotfound-handler fallback and the final exit-code escape (127 not-found / 126 noperm). - execwhile
- Port of
execwhile(Estate state, UNUSED(int do_exec))fromSrc/loop.c:413-498.while/until cond; do body; done. - findcmd
- Port of
char *findcmd(char *arg0, int docopy, int default_path)fromSrc/exec.c:897. Walk$PATH(or DEFAULT_PATH underdefault_path=1) forarg0, returning the matching path on success._docopyis the C source’s “duplicate the result” flag — Rust ownership covers it without an explicit copy step.default_path=1forces/bin:/usr/bin:...search (used bycommand -p). - fixfds
- Port of
static void fixfds(int *save)fromSrc/exec.c:4523. - getfpfunc
- Port of
getfpfunc(char *s, int *ksh, char **fdir, char **alt_path, int test_only)from Src/exec.c:5260. Walks$fpath(or the suppliedspec_pathslice) for a file namednameand writes the resolved directory through*dir_path_out(matching the Cchar **dir_path). ReturnsSome(file_contents_path)on success,Nonewhen not found. - gethere
- Convert a here-document into a here-string. Line-by-line port of
gethere()fromSrc/exec.c:4569-4652. Reads the body from the input stream viahgetc()until the terminator line is matched, returning the collected body as a string.strpis in/out: on entry the raw terminator (possibly with token markers + leading tabs); on return the munged terminator (afterquotesubst+untokenizeand, forREDIR_HEREDOCDASH, leading-tab strip). - getherestr
- Port of
int getherestr(struct redir *fn)fromSrc/exec.c:4655. - getoutput
- Port of
LinkList getoutput(char *cmd, int qt)fromSrc/exec.c:4712-4791. Runs a command-substitution body in the active executor, then routes the captured stdout throughreadoutput(pipe, qt, NULL)semantics at c:4855-4872. - getoutputfile
- Port of
char *getoutputfile(char *cmd, char **eptr)fromSrc/exec.c:4910—=(cmd)process substitution. - getpipe
- Port of
static int getpipe(char *cmd, int nullexec)fromSrc/exec.c:5119. - getproc
- Port of
char *getproc(char *cmd, char **eptr)fromSrc/exec.c:5025—<(cmd)/>(cmd)process substitution via/dev/fd/N(PATH_DEV_FD branch; modern Linux/macOS). - hashcmd
- Port of
Cmdnam hashcmd(char *arg0, char **pp)fromSrc/exec.c:1010. - is_
anonymous_ function_ name - Port of
int is_anonymous_function_name(const char *name)fromSrc/exec.c:5300. - iscom
- Port of
int iscom(char *s)fromSrc/exec.c:962. - isgooderr
- Port of
int isgooderr(int e, char *dir)fromSrc/exec.c:652. - isreallycom
- Port of
int isreallycom(Cmdnam cn)fromSrc/exec.c:972-987. - isrelative
- Port of
int isrelative(char *s)fromSrc/exec.c:996. - loadautofn
- Direct port of
Shfunc loadautofn(Shfunc shf, int ks, int test_only, int ignore_loaddir)fromSrc/exec.c:5050. Walks$fpathfor a file namedshf->node.nam, reads it, installs the text body on the correspondingshfunctabentry, and clearsPM_UNDEFINED. - loadautofnsetfile
- Port of
void loadautofnsetfile(Shfunc shf, char *fdir)fromSrc/exec.c:5657. - makecline
- Port of
static char **makecline(LinkList list)fromSrc/exec.c:2046. - mpipe
- Port of
int mpipe(int *pp)fromSrc/exec.c:5160. - namedpipe
- Port of
char *namedpipe(void)fromSrc/exec.c:5001. - parse_
string - Port of
parse_string(char *s, int reset_lineno)fromSrc/exec.c:283. - parsecmd
- Lex a
<(...)/>(...)/=(...)body — the leading 2 chars are the marker pair (Inang+Inpar,Outang+Inpar,Equals+Inpar), remainder is the command up to the matchingOutpar. Returns the parsed Eprog (and writes the post-)cursor througheptr). - quote_
tokenized_ output - Port of
void quote_tokenized_output(char *str, FILE *file)fromSrc/exec.c:2114. - readoutput
- Port of
Eprog parsecmd(char *cmd, char **eptr)fromSrc/exec.c:4878. - resolvebuiltin
- Port of
resolvebuiltin(const char *cmdarg, HashNode hn)fromSrc/exec.c:2703. Ensures that an autoload-stub builtin has its module loaded before the caller invokes itshandlerfunc. If the stub has no handler,ensurefeatureis asked to load the module and re-lookup the builtin node. C body (abridged): - restore_
params - Port of
restore_params(LinkList restorelist, LinkList removelist)fromSrc/exec.c:4464-4528. After the builtin/shfunc returns, unset every name in removelist, then for each saved param in restorelist re-install its values (PM_SPECIAL go through gsu setfn; regular params re-enter paramtab as-is). - runshfunc
- Port of
void runshfunc(Eprog prog, FuncWrap wrap, char *name)fromSrc/exec.c:6166. The inner shell-function executor — fires module-registered wrapper handlers around the function body, with$_(zunderscore) save/restore and a paramscope push/pop around the wordcode walk. - save_
params - Port of
save_params(Estate state, Wordcode pc, LinkList *restore_p, LinkList *remove_p)fromSrc/exec.c:4410-4458. Walk WC_ASSIGN chain atpc, snapshot each existing param intorestore_p(so the builtin/shfunc can restore them on return) and enqueue every touched name inremove_p(so we know what to unset). - search_
defpath - Port of
static char *search_defpath(char *cmd, char *pbuf, int plen)fromSrc/exec.c:691. - setunderscore
- Port of
void setunderscore(char *str)fromSrc/exec.c:2652. - shfunc_
set_ sticky - Port of
void shfunc_set_sticky(Shfunc shf)fromSrc/exec.c:5527. - simple_
redir_ name - Port of
char *simple_redir_name(Eprog prog, int redir_type)fromSrc/exec.c:4689. - spawnpipes
- Port of
static void spawnpipes(LinkList l, int nullexec)fromSrc/exec.c:5184. - sticky_
emulation_ dup - Port of
Emulation_options sticky_emulation_dup(Emulation_options src, int useheap)fromSrc/exec.c:5501. - stripkshdef
- Port of
Eprog stripkshdef(Eprog prog, char *name)fromSrc/exec.c:6286-6364. Given an Eprog read from an autoload file plus the function name being defined, check whether the file consists of exactly onefunction NAME { … }definition for that name. If so, return a new Eprog whoseprog/strs/patsslice out just the function body (so calling code can invoke the body directly instead of re-parsing). Otherwise return the input untouched. - zexecve
- Port of
static int zexecve(char *pth, char **argv, char **newenvp)fromSrc/exec.c:504. Wrapsexecve(2)with: - zfork
- Port of
static pid_t zfork(struct timespec *ts)fromSrc/exec.c:349.