ShellSpawn and its parser: the record of known issues
This is the single list of known problems of the distribution (the shell layer lib/Proc/ShellSpawn.pm, the spawner lib/Proc/Spawner.pm, its Windows part, the measurements) and of the bugs it found elsewhere. Each item keeps its ID when it is fixed; fixed items move to the end. Older records, now summarized here: Run's Changes, 0.05 and 0.06 (Run R1–R5), pspawn-run-shortcomings.md (0.03) (in Proc-Spawner 0.03) (Run, summary), pspawn-upstream-reports.md (0.03) (in Proc-Spawner 0.03) (P1).
Module names: since 2026-11-02, 07:30 every module is under Proc:: (ShellSpawn is Proc::ShellSpawn, the binding PosixSpawn is part of Proc::Spawner); rows written before keep the old names. Table: pspawn-spawner.md, top.
Open
| ID | Where | What | Status |
|---|---|---|---|
| X1 | executor | Background jobs still running when run() returns went on only in later run() calls (until 0.04): run('sleep 1 && echo b &'), then 3 s of other work, ran echo b at second 3, not 1. Since post-0.04 (K3, the user's choice B, 2026-11-03) they go on between calls too, with a documented cost: the program's own sleep and select return early when a child ends (pspawn-design.md, section 6). An END block still waited for them until post-0.12, so Perl exited later than sh -c 'sleep 2 &' would, and a background job that never ends kept Perl from exiting at all: tail -F xxxx \| tee -a yyyy & (corpus sample NB:9731) ends at once in both shells, which leave the job running, and never ended in ours (timed out after 5 s, last in the run of 2026-11-14). Since post-0.12 (K5, the user, 2026-11-15: "as shell") END waits only while ours has something left to start for a job, then leaves the running processes (PROC_SHELLSPAWN_END: shell, all, none, :SECONDS; pspawn-design.md, section 6): NB:9731 now ends at once. Left: a job whose next command ours still has to start keeps ours waiting until then (the shells leave a copy of themselves for it; without fork ours cannot); one that never runs out of commands, unless :SECONDS is set. | Design question K3 on the checklist "Run Graph API" (run-graph-api.html (0.03) in Proc-Spawner 0.03). Between calls: the user's choice B of the new question (2026-11-03; a handler between calls, with sleep/select returning early documented). At exit: until post-0.12 its choice C (finish every job, with A: a job whose object is gone goes on); since post-0.12 K5 (the user, 2026-11-15: as the shells; PROC_SHELLSPAWN_END, whose all is the old C). Left: above. |
| X2 | executor | $! is the pid of the background job's first process. It is empty when the job starts no process before the & returns, e.g. : & echo $! (dash prints the subshell's pid). Two more effects of the same design, seen by large-subset-difffuzz.pl (post-0.11): wait $! then waits for nothing, status 0 (the shells give the job's status, e.g. 127); and a background job of builtins runs at once, so { echo B; } & echo fg prints B first (dash and bash: fg first; both orders are allowed for an asynchronous job). | Design question K4. |
| X3 | executor | Brace expansion (parser option brace) dies: not implemented. | Open. |
| X4 | executor | Option redir_strict (Q1) is not implemented; only the default (dash's) behaviour. | Open. |
| X5 | executor | Arithmetic error messages are worded differently from dash's (status 2 is the same). | Cosmetic. |
| X6 | executor | With PATH unset, no default search path is used (dash has one). Untested. | Open. |
| X7 | executor | While run() runs, Perl ignores SIGINT and SIGQUIT, as Perl's system does; the caller's own handlers for them are suspended meanwhile. | By design; say if not wanted. |
| X8 | executor | Once, a run printed "Undefined value assigned to typeglob" at the line that restores the previous SIGCHLD action; not reproduced in 4,000 later runs. | Very likely X14. |
| X9 | executor | The virtual current directory is passed to children as a path (addchdir_np). A directory renamed or removed after cd breaks it; addfchdir_np on a kept fd would not. | Open (see the table in pspawn-design.md, section 9). |
| X10 | executor | Tested on Linux only (glibc 2.39; also built with some or all extensions left out, without posix_spawn or fork, and with /proc hidden, as on FreeBSD) and on Windows under Wine only: not on FreeBSD or real Windows. The graph's non-blocking writes open pipes anew through /proc/self/fd where there is one (L10; else FIFOs, X28). (Until 0.05 visible() read /proc/self/fdinfo; until 0.07 the shell layer needed posix_spawn's chdir extension.) | Since 0.07 chdir is done around the call where the libc lacks it (checked post-0.08: built without chdir and fchdir, t/dash.t passes, 13 of 13); since post-0.08 a libc without posix_spawn at all is served by fork and exec (M2). Since 2026-11-02 the XS builds with any libc: Makefile.PL probes each posix_spawn extension by compiling a call, and an option the libc lacks is dropped or fails with ENOTSUP, as %Proc::Spawner::UNSUPPORTED says (seen failing to build on glibc 2.36 before). |
| X15 | executor | Some reference cycles are still broken by hand at the end of a run (release_all, %$c = () in run), against the user's rule that cycles must go through weakened references only. | Narrowed 2026-11-02: the new modules Proc::Spawner and Proc::Spawner::Graph have no cycles (weak back references only). The ones left are in the shell layer: each context sits in its shell's or loop's scope list, which the context holds. Open. |
| X13 | executor | Once, battery.txt gave 40/43 instead of 41/43, right after the graph objects went in; the extra line was not captured, and 21 later runs gave 41/43. | Watch. |
| X16 | executor | If other code takes the status of one of our children first (its own wait or waitpid(-1)), the child is reported with an unknown status, and the shell's $? is 1. Before 2026-11-02 the loop would have waited for it forever. | By design (G3 in pspawn-spawner.md); EXPERIMENTAL. |
| X17 | executor | (minor, the large-subset session's L9) Under set -u, an unset parameter inside eval is reported by dash as eval: x: parameter not set; ours drops eval: . The status is the same (2). | Open: messages do not yet know whether they come from inside eval. |
| X18 | executor | Process-wide state flipped for a while is bullet-proof only in non-threaded execution: Perl's umask around Proc::Spawner::start's call (posix_spawn has no umask setting) and around opening a redirection's file (Proc::ShellSpawn::open_end); the SIGCHLD action while wait_until waits; SIGINT, SIGQUIT and SIGPIPE ignored, and traps set in %SIG, while run() runs. (posix_spawn also cannot make a child ignore a signal, nor set resource limits or the nice value: since post-0.08 these are set around the call too, in C, sigignore, rlimit, nice, M1; per thread on Linux for nice and the signal mask, process-wide for the rest.) | Documented limitation (the user, 2026-11-02), in the modules' comments and pspawn-spawner.md, section 7. |
| X24 | executor | A trap action that sends its own signal again (trap 'kill -INT $$' INT; kill -INT $$) recurses until Perl warns "Deep recursion" (dash crashes with a segmentation fault; bash stops quietly). | Open; seen in 0.03 too. Both shells fail, so the subset could reject it, but the parser cannot see it. A trap that counts down and stops re-sending (n=37; trap 'n=$((n-1)); [ $n -gt 0 ] && kill -INT $$' INT; kill -INT $$) ends in ours as in both shells, also with n=2000 (checked post-0.04); the issue is only the trap that never stops. |
| X27 | measurement (TODO) | The run-time comparison (doc/large-subset/large-subset-state.md, section 7) runs each sample once, in an almost empty directory (a few fixed files), with almost no variables set, and with every program but the plain text tools only logging its arguments. A form that behaves differently only with other files, other values or other programs' output is therefore not exercised: an agreement there says little, and so may a difference (kill $(pgrep x) reached kill with no process ID only because pgrep printed nothing). | Open: the user's four steps (TODO, A1). Step 1 (post-0.08, 2026-11-07, the user's method: parse in one batch, split into atomic blocks): large-subset-blocks.pl sorts the samples from the parse trees into strict, held, almost strict and undecided (then 365, 2, 34,291 and 5,752; today's levels: large-subset-environment.md, section 1; one line per sample: large-subset-provenance.tsv). The run's environment varied (post-0.09): section 9 there (it found that the samples meet in /tmp, and X33). Steps 2 and 3 (post-0.11): sections 10 to 12, and the match across environments, section 11; step 4: Claude's reading of the 93 the setups leave out (section 12). The recorders: since IN1 (post-0.12, 2026-11-17) a program that is only logged reads what the sample feeds it (to 64 KB; its size and SHA-256 logged with the call; t/recorder.t), so code piped into sh is compared too; since A24 (b) not for a program that never reads its input, or zcat naming a file. What each changed: large-subset-state.md, section 7, and Changes, post-0.12. |
| X30 | parser | $LINENO anywhere in a text makes the parser count each command's line from the start of the text (lineof in Proc::ShellSubset::Large), so the parse time grows with the square of the text's length: the 40,212 corpus samples joined into one text (1.5 MB, 41,412 lines) parse in 8.4 s, and in 89 s with one echo $LINENO among them (found 2026-11-07, X27's batch check; 8,000 lines: 0.8 s, with $LINENO 3.2 s). Harmless for one-liners; it matters for long scripts. Since post-0.04 (G8: $LINENO as the line number), so in every release since 0.05. | Open; a fix (count the lines once, look positions up) changes no tree. |
| X32 | executor | ❰BUG❱ (ours; possible, not observed) Perl's own writes into a pipe (the shell's builtins, $( … ) plumbing) never block where Perl has a non-blocking open of its own: a pipe reopened through /proc/self/fd/N, or, without /proc, a pipe of ours made as a named FIFO. Without /proc, a pipe Perl was given (an fd of the caller's, e.g. its stdout as a pipe) has neither: it is written only when select says writable, at most PIPE_BUF bytes at a time, with a blocking write. If another writer (a child) fills the pipe between the select and the write, Perl blocks; if the reader is waiting on Perl itself, that is the hang of L10. | Open (found by Claude reading the code, 2026-11-07; not reproduced, no test). Only without /proc (FreeBSD and the like), only for pipes the caller gave, only with several writers. A fix needs an open of the pipe of Perl's own, which needs a name; or a reader that is not Perl. |
| X56 | parser | ❰BUG❱ (ours; found post-0.11 by the run of the library again, section 7 of large-subset-state.md: exec command -with -flags, from tldr) exec followed by a builtin's name: dash and bash run only a program there, so exec set -e, exec umask, exec type ls, exec command -v ls all say exec: NAME: not found, status 127 (no such program); ours runs its builtin (exec umask prints the mask, status 0; exec command -with -flags: status 248, A4, as command -with alone). The large grammar refuses every builtin it runs itself after exec ("unsupported 'exec' form"), but the base grammar (Proc::ShellSubset), tried first, refuses only cd, : and exit, and what it accepts is not checked again. Seen in that one sample of the library (before X53's fix it ran a program named -with and failed with 127, as the shells, by chance). | Open: a fix (the base grammar refusing what the large one refuses after exec) changes the parser, so the parse results are measured again with it. |
| X20 | tests | One make test from a freshly unzipped distribution failed (2026-11-02, 10:00); its output was not kept. 7 later runs passed, including another fresh unzip. | Watch; keep the output if it recurs. |
| X21 | executor, Windows | The subset runs echo, printf, test, [, kill, time, pwd, true and false as programs, and the rule "the program beats the shells' difference" (doc/large-subset/large-subset-state.md, section 2) makes the coreutils behaviour part of the subset's meaning. Windows has no such programs. | Partly done (post-0.09; the user, 2026-11-08: "echo, printf, test", "inside the Perl process"): echo, printf, test, [, true, false (and since post-0.10 pwd, as pwd -L: 352 runs checked) run inside Perl (lib/Proc/ShellSpawn/Programs.pm), as coreutils 9.4, on every platform by default (decision IP1, the user: "when a well-debugged builtin is already present, use it. (By default; Configurable.)"; PROC_SHELLSPAWN_INPROC=none runs the programs). Checked against coreutils 9.4 on 12,348 runs and 3,000 random words for %q, and by t/programs.t (2,284 runs recorded in t/programs.txt; the shell layer with and without, the same). Known differences: --help and --version print a short text; printf's floating conversions use a double, coreutils a long double (digits beyond a double's precision, e.g. %f of 1.5e300); %q follows gnulib's current rule (decision IP2, the user: "Use the builtin"), not coreutils 9.4's ❰BUG❱ (gnulib's quotearg keeps a stale state when it starts a word over, fixed since): for a word with a ' and a character it escapes, 9.4 writes an extra '' at the start, or, when the word starts with such a character, no $' before it, so the shell reads it back wrong (the word ESC, ', form feed comes out as '\033'\'''$'\f'). Whose echo (decision EC1, the user, 2026-11-09): PROC_SHELLSPAWN_ECHO=coreutils (the default; it heeds POSIXLY_CORRECT), dash or bash (their builtins, which do not; t/echo-shells.txt). kill and time are still open. Proc::ShellSpawn runs on Windows since post-0.10 (pspawn-shell-windows.md). |
| X22 | upstream (bash) | ❰BUG❱ bash 5.2.21: the manual's "Bash POSIX Mode" item 24 says a non-interactive shell exits when a POSIX special builtin returns an error status; bash --posix -c 'shift 3; echo after' and bash --posix -c 'export "1x=2"; echo after' print after (status 1 from the builtin). set -o nosuch and unset -x do exit. | Not ours to fix; the executor follows dash (it stops). Report to bug-bash if wanted. |
| X62 | upstream (Perl) | ❰BUG❱ Perl 5.38.2 (regular expressions; found 2026-11-13 while rewriting read_line): a bracket class that cannot match, under a quantifier, dies: perl -e '"ab" =~ /^[^\s\S]*/' gives panic: regrepeat() called with unrecognized node type 99='OPFAIL' (the same with +, *+, ++, and inside (?:…); (?!)*+ and [^\x00-\x{10ffff}]*+ do not die). Not tried on a newer Perl; not reported yet. | Avoided: read_line builds its expressions so that no class is empty. To report (the user files it, or asks). |
Fixed
| ID | Where | What | Fixed |
|---|---|---|---|
| X11 | executor | No posix_spawn on Win32: there the executor would need Run's wraparound (claude/Run-0.06.tar.gz-base64.txt), or a CreateProcessW binding. Not integrated. | Decided 2026-11-01: W1–W3 Go (W2 option C), experimental, to be written in Proc::Spawner, which exists since 2026-11-02 (pspawn-spawner.md). Closed (the user, 2026-11-07): done; the CreateProcessW binding is win_spawn.h (0.07), and without posix_spawn and fork Run's redirections serve Perl's own spawn (M2, system1); both checked under Wine (t/windows.t). What remains for Windows is listed in TODO. |
| X12 | tests | The corpora (tldr, NL2Bash, …) have not been run through the executor. Plan: section "Corpus testing" below. | Closed (the user, 2026-11-07): done another way, by the run-time comparison of post4-0.04 (every accepted corpus sample run in dash, bash --posix and ours: doc/large-subset/large-subset-state.md, section 7; its limits: X27). |
| X14 | executor | ❰BUG❱ The SIGCHLD handler is installed with POSIX::sigaction without safe(1), so it is an immediate handler: Perl runs it inside the signal, in the middle of any Perl operation. In a stress test such a handler corrupted Perl's heap in 4 runs out of 4 (glibc abort); a deferred one never did. A deferred handler alone can miss a wake-up just before select. Details: perl-signals-findings.md, S1–S3. | Interim fix applied 2026-11-01 (B1 on the page “Child Exit Wake-up”): a deferred handler and a 50 ms timeout on select. Before it, the executor itself died with a segmentation fault in 4 stress runs out of 4; after it, 4 out of 4 finished normally. Final fix applied the same day, EXPERIMENTAL (endorsed experimentally by the user, 2026-11-02): D1 option A, a C handler in the binding (today in Proc::Spawner::Loop::POSIX, the fallback with safe(1)) (pspawn-extensions.md, section 6); B1 is now only the fallback. |
| X19 | executor | trap "echo int" INT; x=$(kill -INT $$); echo after printed after before int in about 1 run of 30 (dash: always int, then after); also with a subshell. Cause: the trap's action was deferred like any reaction, so the command after the substitution could run first. | Fixed in 0.04: a caught signal is queued on the shell that set the trap, and a list runs the queued actions before its next command (run_pending); 0 wrong orders in 160 runs; the FLAKY entries in t/dash-known.txt are gone. |
| X25 | executor, parser | ❰BUG❱ (ours; in every version since 0.01, so on CPAN in 0.02, 0.03, 0.04) break or continue in a group that is a pipeline element inside a loop (for v in 1; do echo a \| { continue; }; done) died with Perl's "Modification of non-creatable array value attempted, subscript -1": the parser (Proc::ShellSubset, which counts loops through pipelines) let it through, but the executor (Proc::ShellSpawn) runs each pipeline element as a shell of its own, which knows no loops. Checked: 0.01 and 0.04 die so. | Fixed in post-0.04: it ends that shell with status 0, as dash (rule E, as for a subshell). |
| X26 | parser, executor | ❰BUG❱ (ours; checked: the parsers of 0.01 and 0.04 accept it, so every CPAN release has it) unset array[2] and unset foo[$i] were accepted; post3-0.04's executor then did nothing, with status 0: dash stops with "bad variable name" (status 2), bash unsets an array element (or fails with status 1 for a plain variable). The detector missed the difference, so the corpus measurement counted these samples as accepted correctly. | Fixed in post4-0.04: rejected, as bash's arrays are; detector feature unsetarr (probe unsetarr). |
| X29 | executor | ❰BUG❱ (ours; 0.07, 0.08) Where the fd actions are done around the call (a libc without them; PROC_SPAWNER_MISSING in tests; Perl's own spawn, M2), the copies of the fds put back after were made above the highest number in the actions, an open's flags and mode included (O_WRONLY\|O_CREAT\|O_TRUNC is 577), plus 1000: above the common soft limit of 1024 fds, so F_DUPFD failed and the call with it (EINVAL). Not seen in the tests, where root's limit here is 20000; found on Windows. | Fixed post-0.08: the copies go just above the highest fd the actions name (the extra 1000 served nothing). Checked: 0.08's code with ulimit -n 1024 fails, the new one works. |
| X28 | tests, executor | ❰BUG❱ (ours; RT #182479, Slaven Rezic, FreeBSD) The tests needed Linux's /proc and /bin/true, /bin/grep; and without /proc the library itself (checked by running the suite on Linux with /proc hidden by an empty mount): Perl's write into a pipe it shares with children made the shared open file non-blocking, so the children's writes failed with EAGAIN and output was lost (the fallback of L10); an fd's close-on-exec flag was read from /proc/self/fdinfo, and every fd taken as inherited without it; ulimit died. | Fixed in 0.06: tests portable or skipped with a reason; a pipe of ours is a named FIFO opened once more for Perl's own writes where /proc/self/fd cannot open it anew, a pipe we were given takes PIPE_BUF bytes per blocking write; fcntl (Proc::Spawner::__fd_cloexec); ulimit asked a shell (dash, bash --posix, ksh or sh; in /bin first, then on PATH); since post-0.08 it uses getrlimit (Proc::Spawner's XSUB), with or without /proc. FreeBSD itself not tested here. |
| X31 | Windows | ❰BUG❱ (ours; post-0.08: only in the Windows code, fixed before a release was built for Windows) Proc::Spawner's open file action on Windows (win_spawn.h, WIN_FA_OPEN) hands the path to CreateFileW as it is, joined with the working directory, so /dev/null there means \dev\null on the current drive and fails; Perl's own open, sysopen and fopen map the exact name /dev/null (any case) to NUL (win32/win32.c, win32_open, win32_fopen, win32_freopen, Perl 5.38.2). The shell layer is not affected: Proc::ShellSpawn opens redirection targets with Perl's sysopen and hands on the handle. (/dev/nul is no way out: a last component nul was taken as the device in any directory by older Windows, but Windows 11 narrowed that rule; unchecked here.) Found 2026-11-07 (X27's devnull). | Fixed post-0.08: WIN_FA_OPEN maps /dev/null (any case) to NUL, as Perl does. Checked under Wine from a directory on C: (on Wine's Z:, which is the Linux root, \dev\null is Linux's own and hides the bug): a test program of win_spawn.h failed before (ENOENT) and passes after; t/windows.t (new test 8) passes with both primitives. Perl's other Windows special cases were checked against ours: program lookup, quoting, cmd.exe and batch files, the child's directory, binary pipes, appending were already matched; kill, isatty, stat, unlink, rename go through Perl. |
| P1 | parser | ❰BUG❱ A setting before a command could get the wrong NAME when its value had $( … ) (A=$(true) B=$(false) env gave t and B): push @env, $1, word('e') passes $1 by alias and word() matches again. Same in ShellSubsetSmall.pm. | 2026-11-01, in the project's ShellSubset.pm and ShellSubsetSmall.pm (claude/pspawn-parser-setting-name.patch; now in the style push @env, "$1", word('e'), and other bare $1 arguments also became "$1"), with tests OWN:205–207 that compare the whole tree. shell-subset-tests.pl now can check trees, not only acceptance. |
| E1 | executor | Every child had SIGFPE ignored: Perl ignores it for itself and posix_spawn passes that on (Perl's own exec puts back the disposition Perl found at startup, PERL_FPU_PRE_EXEC, PL_sigfpe_saved). | 2026-11-01: SIGFPE is in sigdefault unless it was ignored when Perl started (PosixSpawn::fpe_at_exec()). |
| E2 | executor | Background children did not have SIGINT and SIGQUIT ignored, as POSIX asks of an asynchronous list without job control (dash: SigIgn 0x6). | 2026-11-01: ignored in Perl while run() runs; foreground children get them back by sigdefault, background ones keep them. |
| E3 | executor | Environment entries whose names are not identifiers (BAD-NAME=1) were passed to children; dash drops them. | 2026-11-01. |
| E4–E18 | executor | 15 problems found by the cold review of 2026-11-01: a hang when SIGCHLD interrupted select; fds leaked by exit in loops; a memory leak through reference cycles; read splitting with non-blank IFS, backslashes and continuation lines; two reads on one fd; >&N reaching the module's own fds; settings across a $( ); $! in subshells and pipelines; && \|\| ?: short-circuit in $(( )); [[:alpha:]] in case; continue and the loop status; where redirection errors are written; an XS leak on croak; read a <&-; ./nosuch message. | 2026-11-01 (pspawn-design.md, section 7). |
| E19 | tests | fdbattery.txt, mem.pl and xs.pl used absolute paths into an earlier session's scratchpad, so in a new session fdbattery.txt gave 12/14 and mem.pl did not start. | 2026-11-01: ./fds, and paths relative to the scripts (FindBin). |
| E20 | executor | A command with many words (echo with 200 arguments, for over 300 words) printed "Deep recursion on subroutine" warnings: each word's expansion called the next one directly. | 2026-11-01: expand_list loops while words expand at once, and resumes from a $( ) later. |
| U1–U5 | parser | **❰BUG❱**s found by the ShellSubsetLarge session (large-subset-upstream-reports.md (0.03) (in Proc-Spawner 0.03)): strings starting with - or + (sh takes them as options), patterns that may match . or .. (dash and bash differ), \" in backquotes inside "${…}", digits before a redirection operator in a target (x >&2>f), and settings of names the shell sets (UID=5 cmd). | 2026-11-01: claude/large-subset-shellsubset.patch applied to claude/ShellSubset.pm and its two test files (222/0 own, 612/0 corpus, 142/0 large-subset tests). The four that apply ported to claude/ShellSubsetSmall.pm (claude/pspawn-small-u1-u5.patch; Small has no ${…} forms, so U3 does not apply): 0 of 1,039 strings differ between the two parsers. In the executor's batteries, echo .* \| wc -w (t3) is now outside the subset. |
| E21 | executor | Every $(( )) leaked about 5.6 KB: the two parsers inside arith held each other in closures, a reference cycle. Found by sigprobe/mem-large.pl, now t/memory.t (mem.pl has no arithmetic). | 2026-11-01: the closures refer to each other through weakened references. |
| E22 | executor | A command whose words all expand to nothing skipped its redirections (x=; $x >f did not create f). | 2026-11-01 (visible only with the large grammar, which allows $x as the command name). |
| L1–L5 | executor | **❰BUG❱**s found by the ShellSubsetLarge session's random-string comparison with dash (large-subset/tools/large-subset-difffuzz.pl; details in large-subset-upstream-reports.md (0.03) (in Proc-Spawner 0.03)): L1 "$@" with no parameters gave one empty field; L2 field splitting ignored IFS; L3 OPTIND did not start at 1; L4 set -u missed ${x%p} and the like; L5 an EXIT trap of a background job or pipeline element that had already started a program ran after the shell's fds were released ("Bad file descriptor"). | 2026-11-01 (evening), in lib/ShellSpawn.pm. L5: a shell whose EXIT trap is set keeps its own fds until the trap has run. Lines for all five are in largebattery.txt. |
| L6 | executor | ❰BUG❱ (reported by the large-subset session, large-subset-upstream-reports.md (0.03) (in Proc-Spawner 0.03)) kill … $$ in a subshell, a pipeline element or $( … ) ignored the main shell's trap for that signal and ended the whole string; in sh $$ is the main shell, which runs its trap. | 2026-11-02: a subshell's state knows its main shell (main); kill looks up the main shell's trap and, if set, runs it as a real signal would. Tests: four lines added to largebattery.txt. |
| L7 | executor | ❰BUG❱ (minor, same report) getopts with new arguments after an earlier loop had run to its end did not start over as dash does. | 2026-11-02: with OPTIND past the end of the arguments, getopts starts over at 1 (as dash's getoptscmd). |
| L8 | executor | ❰BUG❱ (minor, same report) When getopts found no more options it unset OPTARG; dash leaves it as it was. | 2026-11-02. |
| A4s | executor | The status for a construct outside the subset found at run time was 2; the large-subset session decided 248 (large-subset/large-subset-spec.md, section 5). | 2026-11-02: claude/large-subset-a4-status.patch applied ($ShellSpawn::Large::UNSUPPORTED). |
| L10 | executor | ❰BUG❱ (reported by the large-subset session, large-subset-upstream-reports.md (0.03) (in Proc-Spawner 0.03)) Perl's own output (error messages, umask, command -v, cd -, getopts messages, A4's message) was written with a blocking POSIX::write. When a child had already filled the same pipe, the whole loop stopped; with Perl as the reader ($( … )) it never resumed: x=$(head -c 10000000 /dev/zero & umask; wait); echo ${#x} hung. | 2026-11-02, two parts. (1) The shell layer: every such write goes through the graph's perl_write (new put($c, FD, TEXT, THEN); msg and fail($c, STATUS, TEXT) use it), and the command goes on only in THEN, after the write is done, so nothing started later overtakes the text. (2) The graph: making a pipe non-blocking would make the children writing to the same pipe fail with EAGAIN (the flag belongs to the open file, which they share), so perl_write opens the pipe or FIFO anew through /proc/self/fd/N (Linux: a new open file of the same pipe) and makes only that one non-blocking; elsewhere it falls back to the previous behaviour (X10). Tests: pspawn-l10.txt (9 strings, 1.4 s; the 4 differences are message prefixes inside captured text, and printf being a program here), a line in largebattery.txt. All six snapshotted batteries identical before and after. |
| D2 | executor, parser | Not a bug: the large-subset session's request (the user's decision D2(A)): redirections without a command (> f), and settings with redirections (x=1 >f). | 2026-11-02: claude/large-subset-d2-base.patch (ShellSubset.pm) and claude/large-subset-d2-exec.patch (x_set) applied as sent; the bundle's parser/ShellSubsetLarge.pm (now lib/Proc/ShellSubset/Large.pm), parser/large-subset-tests.pl (now t/parser/) and large-subset-difffuzz.pl refreshed from the Project. Tests: pspawn-d2.txt (9 of 11 agree; the two others are a test-file artefact and < f alone, rejected on purpose), two lines in largebattery.txt. |
| E23 | executor | $( … ) kept NUL bytes; dash drops them (x=$(printf "a\0b"); echo ${#x}: dash 2, ours 3). Found while testing L10. | 2026-11-02 (rule A5, as dash). A line in largebattery.txt. |
| X23 | executor | pwd runs the program /bin/pwd (decision B2 of the base parser's checklist, not the B2 of "Shell Corpus Gaps"), which prints the directory with symbolic links resolved; both shells print it as reached (cd link; pwd: …/link in both, …/real with the program). large-subset-state.md, section 1, wrongly counted pwd among the programs where the shells agree anyway. pwd -L and pwd -P agree with both shells. | Post2-0.03, the user's choice C: pwd runs as /bin/pwd -L with PWD set to the shell's own directory, operands dropped (Proc::ShellSpawn::Large::b_pwd); it prints what both shells print. Options both shells refuse (pwd -x) are rejected since post-0.03 (rule Q1; test LS:111 changed). |
| X33 | measurement | ❰BUG❱ (ours; in large-subset-runcompare.pl since post4-0.04) The runner opened each run's standard output and error files as root before dropping to the run's user, so they belonged to root. On Linux /dev/stdout and /dev/stderr reopen the file by its path (through /proc/self/fd), so echo x > /dev/stderr failed with "Permission denied" in all three shells alike: the samples that write to /dev/stdout or /dev/stderr were compared failing, not working. Of the 40,410 accepted samples 3 name them, none in a redirection; one of the 3 opens one for writing in a program that really runs there (echo 'ee' \| tee /dev/stderr \| foo; the other two give it to find and duckdb, which only log). Found 2026-11-08 by a probe for X27's environment variants. | Fixed post-0.09: the files are made and given to the run's user first. |
| X34 | executor | ❰BUG❱ (ours; 0.07 to 0.09, in the Windows code: win_spawn.h) The process handles kept for the children's exit codes were in a fixed table of 1,024; a child started while it was full had its handle closed at once, and if it ended before it was waited for, nobody held a handle to it any more and its status was lost. Checked under Wine: 1,100 children started before any is waited for, all ended by then: 76 statuses lost (1,100 - 1,024). | Fixed post-0.09: the table grows (on the process heap); the same check loses none. |
| X35 | executor | ❰BUG❱ (ours, probable; found 2026-11-08 by X27's stand-in run) unset of a word that is not a name (from an expansion: unset $(locale \| cut -d= -f1) given a.txt) does nothing, with status 0. dash fails ("unset: a.txt: bad variable name", status 2, and as a special builtin's error it ends the shell); bash takes the word for a function's name (status 0); unset -v a.txt fails in bash too (status 1). Ours checks names in read but not in unset (Proc::ShellSpawn::Large::b_unset). Rule A5 (errors at run time as dash) would make it fail as dash. | Fixed post-0.09 (the user, 2026-11-08: as dash): such a word stops the shell with "unset: WORD: bad variable name" and status 2, the names before it already unset; unset -f takes any word, as dash. Checked against dash on 8 strings, 6 of them now in largebattery.txt (t/dash.t). Found in 2 corpus samples, only with a stand-in's output (large-subset-environment.md, section 9). |
| X36 | binding | ❰BUG❱ (ours; 0.01 to 0.09; RT #182809, "Undefined symbol "av_count"", Slaven Rezic, 2026-11-08, perl 5.30.3 on FreeBSD) Spawner.xs used av_count(), which perl has only since 5.33.1, though MIN_PERL_VERSION is 5.020: with any perl before 5.34 Spawner.so failed to load ("Undefined symbol "av_count""), and every test with it. | Fixed post-0.09: Spawner.xs defines av_count where perl does not, as perl does (AvFILL + 1). Checked with perl 5.30.3 built here (Linux): 0.09 fails to load as reported, the fixed tree passes the suite; against perl 5.20.3's headers the XS compiles with no undeclared function (that perl did not build here, so its suite was not run). FreeBSD itself not tested here. |
| X37 | executor | ❰BUG❱ (ours; 0.10, in the programs that run inside Perl since IP1, Proc::ShellSpawn::Programs) printf's \u and \U always printed the character, UTF-8 encoded, also where the locale cannot encode it: in the C locale printf '\u20AC' gave € where coreutils 9.4 prints \u20AC (gnulib's print_unicode_char: the escape, in capital hex, \UXXXXXXXX above U+FFFF; above U+10FFFF everywhere), and a surrogate (\ud800) gave bytes where coreutils stops with "invalid universal character name \ud800" and status 1; %b printed nothing of its argument before an invalid escape, where coreutils prints what came before it. Found 2026-11-08 by the behaviour run with the in-process programs (one corpus sample, printf "\u20AC %.2f\n" 123.4; large-subset-state.md, section 7). | Fixed post-0.10: as coreutils in the C and UTF-8 locales (another legacy locale, which coreutils would convert to with iconv, gets the escape); 14 runs added to t/programs.txt, which fail without the fix. |
| X38 | executor | ❰BUG❱ (ours; Windows, the primitive system1 only, that is Perl's own spawn, used where the module has no posix_spawn, as with PROC_SPAWNER_MISSING=posix_spawn) The child gets every inheritable handle of ours, not only the fds given to it. Perl's pipe on Windows makes inheritable handles (on POSIX Perl marks fds above $^F close-on-exec, on Windows it does not), and Perl's spawn passes them all. A child given the read end of our pipe as its fd 0 then also holds the write end, and never sees end of file. Found 2026-11-09 under Wine by t/spawner.t (its megabyte test hung, once the file ran on Windows); with our two ends marked not inheritable (__set_cloexec) all 52 tests pass. Not affected: the posix_spawn primitive (win_spawn.h passes exactly the handles listed), and the graph's own pipes (made not inheritable). Perl's side: ❰BUG❱ in Perl, perl-win32-system-bugs.md, 4. | Fixed post-0.10 (the user, 2026-11-09: "do as on POSIX"): around system1's call on Windows our fds from 3 up are made not inheritable and put back after; not thread-safe (pspawn-spawner.md, section 8, M2). The test passes through both primitives under Wine without marking its ends. |
| X39 | executor | ❰BUG❱ (ours; found 2026-11-10 by X27's step 2: large-subset-environment.md, section 10) . of an empty file, or of a directory: ours printed "sh: the: not found", then Perl died ("Can't use an undefined value as a subroutine reference", status 11); dash does nothing (status 0). b_dot read the file in list context as an argument of run_text: an empty file gave no argument at all, so the message "the text of '. FILE'" became the text and the continuation was lost. | Fixed post-0.11 (branch x27-step2, merged; in 0.12): read in scalar context; test: t/batteries/largebattery.txt (an empty file and a directory, as dash). |
| X42 | executor | ❰BUG❱ (ours; found 2026-11-10 by X27's step 2) A value that is not a number where a number is wanted, known only at run time: exit $v with v=x1 exits with status 0 after Perl's warning "Argument "x1" isn't numeric"; return $v sets $? to x1; $((v+1)) prints Perl's warning before ours' own error. dash and bash agree for exit and return ("Illegal number", "numeric argument required", status 2); for arithmetic dash fails, bash takes x1 for a variable's name (0). Written literally (exit x1) the parser refuses it (outside the subset). | Fixed post-0.11 (branch x27-step2, merged; in 0.12), decision NV1 (the user, 2026-11-10: "as the shells"): an operand of exit, return, break, continue known only at run time must be a number as dash takes it (digits, maybe after +, at most 2^31-1; break, continue at least 1), else "exit: Illegal number: x1", status 2, and the shell ends (a special builtin's error, as dash; where bash differs, after break 0, exit -1, dash's way); arithmetic on such a value: ours' own error without Perl's warning. Tests: t/batteries/largebattery.txt. |
| X43 | executor | ❰BUG❱ (ours; found 2026-11-10 by X27's step 2) set -o "$o" with a name that is no option, known only at run time (o=x1, or empty), does nothing, with status 0; dash and bash fail ("Illegal option -o x1", "invalid option name", status 2; bash lists the options for an empty name). Written literally, the parser refuses it. | Fixed post-0.11 (branch x27-step2, merged; in 0.12), NV1: "set: Illegal option -o x1", status 2, the shell ends, as dash; also an option letter that is no option (set -$v with v=z); set -o with no name at run time lists in both shells: A4 (outside the subset), as the parser has it. |
| X40 | executor | ❰BUG❱ (ours; found 2026-11-10 by X27's step 2, large-subset-environment.md, section 10) A character class in a bracket expression of pathname expansion never matches: ls *[[:digit:]].jpg with m0.jpg there lists nothing (the word stays as it is), dash and bash list m0.jpg; also [[:alpha:]].jpg. Pathname expansion goes through Perl's File::Glob::bsd_glob, which has no character classes; case patterns and ${v#p} (ours, glob_re) have them. | Fixed post-0.11 (branch x27-step2, merged; in 0.12): each [:class:] of a bracket expression is spelled out as its characters (the C locale's, as dash there) before bsd_glob sees it; in a UTF-8 locale dash also counts other letters (é in [:alpha:]), ours does not. [^...] stays negation (rule E). Test: t/batteries/largebattery.txt. |
| X41 | parser | ❰BUG❱ (ours; found 2026-11-10 by X27's step 2) In "${v#$x}" (and %, ##, %%) the value of $x is taken literally: the parser marks $x quoted, as if "${v#"$x"}" had been written. POSIX: enclosing the whole expansion in double quotes does not quote the pattern's characters, quoting within the braces does; dash and bash agree (x='a*'; v=abcabc; echo "${v#$x}": bcabc; ours abcabc). Unquoted, ${v#$x} is right; a literal pattern, "${v#a*}", is right too. | Fixed post-0.11 (branch x27-step2, merged; in 0.12): in a % or # pattern word the parser no longer marks an expansion quoted by the outer "..." (also inside a bracket expression); "${v#"$x"}" stays literal. The parse results' digest changed (89075620…); measured again (the stored scan reparsed): the parse results, samples.tsv, the scan and large-subset-provenance.tsv identical. Test: t/batteries/largebattery.txt. |
| X44 | executor | ❰BUG❱ (ours; found 2026-11-10 by X27's step 2, large-subset-environment.md, section 10) cd DIR into a directory the user may not search (mode 000) succeeded in ours, which keeps the shell's directory itself and checked only that it is a directory; dash and bash fail ("can't cd to DIR", status 2; bash "Permission denied", 1), and the commands after it then ran elsewhere than in the shells. | Fixed post-0.11 (branch x27-step2, merged; in 0.12): the directory must also be searchable (-x; not on Windows, which has no such bit), else dash's message and status 2. Test: t/programs.t (as a user other than root, who may enter any directory). |
| X45 | executor | ❰BUG❱ (ours; found the same way) cd without operand with HOME set but empty failed ("cd: HOME not set", status 1, which rule E chose for HOME unset); dash and bash do nothing, status 0. | Fixed post-0.11 (branch x27-step2, merged; in 0.12): HOME empty, nothing and status 0, as both shells; unset, as before (rule E). Test: t/batteries/largebattery.txt. |
| X46 | executor | ❰BUG❱ (ours; found 2026-11-10 by X27's match report, large-subset-environment.md, section 11) shift with an operand known only at run time that is no number as dash takes it: shift $(($#-1)) with no arguments (shift -1) did nothing, with status 0; shift $v with v='[n]' printed Perl's warning. dash and bash fail ("Illegal number", status 2; bash "shift count out of range", 1). | Fixed post-0.11 (branch x27-step2, merged; in 0.12), as NV1 (X42): dash's error, status 2, and the shell ends. Test: t/batteries/largebattery.txt. |
| X47 | executor | ❰BUG❱ (ours; found the same way) The message of a command that does not start ("not found", "Permission denied") went to the shell's own standard error, not to the command's: nosuch 2>log left log empty, nosuch 2>&1 \| cat and x=$(nosuch 2>&1) did not see it; dash and bash write it where the command's fd 2 goes (in a group, { nosuch; } 2>log, ours was right, the group's redirection being the shell's). | Fixed post-0.11 (branch x27-step2, merged; in 0.12): the message is written through the command's own descriptors (a redirection that fails, "Bad file descriptor", still to the shell's). Test: t/batteries/largebattery.txt. |
| X48 | executor | ❰BUG❱ (ours; found post-0.11 by large-subset-difffuzz.pl, ported back) return outside a function (not in eval or . text) always ended the shell, status 2, though rule E says "an error, as bash": bash --posix ends the shell only where return stands as a command of its own (return; echo n, echo a && return); where its status is tested (left of && or \|\|, after !, the condition of if, while, until) it gives status 2 and the shell goes on (return \|\| echo o prints o); dash ends silently, status 0. | Fixed post-0.11: in a tested place (the context set -e already knows, cond) the message, status 2, and on; checked against bash --posix in 16 forms. Test: t/programs.t. |
| X49 | executor | ❰BUG❱ (ours; found the same way) A signal ignored on entry (as the commands of an unattended session often have SIGINT) could still be trapped (trap 'echo int' INT; kill -INT $$ ran the action), and kill -INT $$ without a trap ended the string; POSIX: "Signals that were ignored on entry to a non-interactive shell cannot be trapped or reset", and both shells do nothing then. | Fixed post-0.11: trap leaves such signals alone, and kill ... $$ with one does nothing ("on entry": when Proc::ShellSpawn was loaded, %IGN0, already used for the children). Where the shells differ, trap - INT then kill -INT $$ (bash dies, dash goes on), ours is as dash (A5). Test: t/programs.t. |
| X50 | executor | ❰BUG❱ (ours; found post-0.11 by large-subset-difffuzz.pl with -j 4, seed 3, two hours) An expansion error inside a here-document's body (set -u with an unset variable, ${x:?}, an arithmetic error) ended the shell; dash fails only that redirection: the command does not run, status 2, the shell goes on (a special builtin's failed redirection, as : <<E, still ends it). bash ends the shell for a builtin, a function or a compound command, and gives status 127 and goes on for a program. Also, the message and a $( ) in the body did not go through the command's redirections made before the here-document (cat 2>/dev/null <<E), as in both shells. | Fixed post-0.11: the body is expanded with the redirections so far, and an error that would end the shell fails the redirection instead (as dash, rule A5); checked against dash in 10 forms. Test: t/programs.t. |
| X51 | executor | ❰BUG❱ (ours; found the same way) A trapped signal's action ran as soon as the signal came, also while the foreground command was still running inside this process (trap "echo int" INT; kill -INT $$ \| while getopts ...; do echo $o; done printed int first; both shells: after the pipeline, as POSIX says: "the trap ... shall not be executed until after the foreground command has completed"). And a trap in a subshell (a pipeline element, ( )) replaced the main shell's handler for the whole process, so a later signal was lost (two kill -INT $$ gave one int); in both shells a subshell is another process, which a signal sent to $$ does not reach. | Fixed post-0.11: a caught signal is only queued, and the main shell's list runs the queued actions before its next command (X19's place); trap in a subshell records its action (for trap and for the signals its programs inherit) but leaves the process's handlers alone. Checked against dash in 13 forms, 5 runs each. Limit: a real signal sent to this process while a subshell runs (a program's kill $PPID) is the main shell's, not the subshell's. Test: t/programs.t. |
| X52 | executor | ❰BUG❱ (ours; found post-0.11 by a probe of how the three split and glob values from the environment, X27) A word from an unquoted expansion whose only pattern characters are escaped by a backslash was matched against files: x='x\*'; echo $x with a file x* there printed x*; dash and bash do no pathname expansion then and keep the word as it is, x\* (the backslash is no quote in an expansion's result, but it does escape in the pattern, so x='[x]\*' matches x* in all three). | Fixed post-0.11: only a pattern character not escaped by a backslash makes a word a pattern. Test: t/programs.t. |
| X53 | executor | ❰BUG❱ (ours; found post-0.11 by step 2 on step 3's class affects-shell, X27) A form of command the parser refuses (another option than -p and -v, -v with more than one name, -p followed by an option), made only by expansions at run time (x=-n; command $x), was run: -n as a program name (not found, 127; command -v a b: only a); both shells take the option as command's (an error, status 2). | Fixed post-0.11: such a form is outside the subset at run time, as A4 decides (the message, status 248). Test: t/programs.t. |
| X54 | executor | ❰BUG❱ (ours; found post-0.11 by step 2 on step 3's names with an expansion, X27) cd with more operands made by an expansion at run time (x="d e"; cd $x, cd $(dirname $a $b)) said cd: bad argument, status 2: neither shell (dash takes the first, bash: "too many arguments", status 1), and not as ours with the operands in the text (as bash, rule E). | Fixed post-0.11: "too many arguments", status 1, as bash, either way. Whether ours may answer as bash there stays TODO A13 (cd with extra words). Test: t/programs.t. |
| X55 | executor | ❰BUG❱ (ours; found post-0.11 by the races of X27's step 3, run many times) The deferred SIGCHLD handler that moves background jobs on between run() calls (K3) reaps through waitpid, which sets $? (to -1 when it finds nothing yet), and did not keep the program's $? and $!: a job that ended while the program ran its own code changed the program's $?. Seen as ours' status 255 without a message in about 1 run of 200 of … & samples (exit $st sets $?, the handler ran before the END block's local $?, and Perl exited with -1). | Fixed post-0.11: the handler keeps $? and $! (local). Test: t/between.t. |
| X57 | spawner | ❰BUG❱ (ours; found post-0.12 checking Proc::Spawner in a pseudo-process, a child of Perl's fork emulation, under Wine) On Windows, win_spawn.h looked a program up with the process's PATH and PATHEXT, not with Perl's (a pseudo-process has its own environment): spawn('prog', ..., { search => 1 }) after $ENV{PATH} was set in a pseudo-process did not find a program only that PATH names (ENOENT). A relative name with a directory part (sub\prog, with search) and a relative PATH entry were taken from the process's directory, not from the child's (Perl's, after the chdir actions; glibc's posix_spawnp takes them from the child's). A name like D:prog was joined as DIR\D:prog. The child's environment and directory were right (Perl's, as Perl's own spawn takes them). | Fixed post-0.12: PATH and PATHEXT are Perl's (the hook var, PerlEnv_getenv), relative names and PATH entries are taken from the child's directory, D:prog from that drive's directory. Test: t/windows.t (under Wine, both primitives). |
| X58 | spawner | ❰BUG❱ (ours; found the same way) A name given twice in the child's environment (in any case, on Windows): win_spawn.h sorted the block with qsort, which put either first, so the child took either value (Windows' own lookup takes the first, a C runtime's environ, and so Perl's %ENV, the last); system1 (through %ENV) kept the last. Met under Wine, where Perl's own environment for a child names about 210 variables twice (a fault of Perl's that shows where the process's environment is not sorted, as under Wine: the child of a pseudo-process got a changed variable's old value). | Fixed post-0.12: the first entry of a name only, as getenv finds it, by both primitives. (A variable deleted in a pseudo-process still reaches the child under Wine, through Perl's environment for a child, as with Perl's own spawn: Perl's fault, not ours.) Test: t/windows.t. |
| X59 | spawner | ❰BUG❱ (ours; found post-0.12 writing X57's test) Proc::Spawner::reaped(PID), documented for a caller of spawn who waits for the child itself (on Windows it releases the process handle kept for the exit code), was gone since W5 (post-0.10): calling it died, and such a caller could not release the handle. In 0.11 and 0.12. | Fixed post-0.12: reaped is back; start's child watch calls it. Test: t/spawner.t. |
| X60 | executor | ❰BUG❱ (ours; found 2026-11-13 by reading, for the decision page "Executor Idiom Review"; the same fault as E20, in the loops that did not get E20's inner loop) A loop of the shell layer whose items finish at once calls itself once per item, and from 99 items on Perl warns "Deep recursion on anonymous subroutine": export a1 a2 … a100 prints it twice (seen with t/try.pl; the command itself works). By reading, also a here-document or a double-quoted string with 100 expansions, and a case with 100 items that do not match; memory grows with the number of items. | Fixed post-0.12 (items JB1 and JH1, the user, 2026-11-15): one loop helper, loop_async, runs the next step in a plain loop when it finishes at once and resumes from the event loop when it finishes later; each_async (export, readonly, local), expand_list (whose own inner loop, E20, it replaces), a word's parts, the redirections, if's arms, case's items and patterns, the settings before a command or alone, an in-process program's writes, jobs and hash go through it. Test: t/long-lists.t (300 items each: export, settings, a double-quoted word, a here-document, case, redirections, pattern parts; 8 of its 16 checks failed before). |
| X61 | executor | ❰BUG❱ (ours; found 2026-11-13 for the same page, by comparing a copy of the code with dash 0.5.12 and bash 5.2.21 on random lines) read keeps a final delimiter that both shells drop when IFS blanks stand before it: echo "a :" \| { IFS=" :" read x; echo "[$x]"; } gives [a :], theirs [a] (seen with t/try.pl). Of 2,500 random cases without backslashes (a line, an IFS value, -r or not, 1 to 3 names) the two shells agreed on all, and ours differed on 14, all of this kind. With backslashes in the line, dash and bash also differ from each other in some cases. | Fixed post-0.12 (item JB2, the user, 2026-11-15): blanks may stand before the final delimiter (one group in read_line's expression for the end); 0 of the 2,500 differ now, nor of 5,000 more (seeds 2 and 3). Test: two lines in t/batteries/t1.txt (t/dash.t, and recorded for t/portable.t). The cases with backslashes, where dash and bash differ from each other, are for the user to decide one by one (not done). |
| X63 | executor | ❰BUG❱ (ours; found 2026-11-14 for item JH4 of the decision page "Executor Idiom Review", by running the forms in dash 0.5.12, bash 5.2.21 and ours) kill with the shell's own process ID and a signal that is none ends the shell, where dash and bash print an error and go on (dash status 2, bash 1): kill -FOO $$; echo after and kill -s FOO $$ end ours (through t/try.pl: Perl's "No such signal: SIGFOO", status 29), also kill -l $$ (the l read as a signal's name); and kill - TERM $$ ends ours by SIGTERM (status 143): the bare - is read as -s. Without $$ these forms go to the program kill, which refuses them (status 1). The cause: b_kill reads its options twice, in two ways, and does not check the signal's name before taking the signal itself. | Fixed post-0.12, on the branch executor-idioms, merged 2026-11-14 (the user's choice of 2026-11-14, way A, provisionally): the options are read once, and the shell takes the signal itself only when $$ is among the process IDs and the signal is one that exists; every other form goes to the program kill as written, which refuses it, and the shell goes on. Test: t/programs.t. |
| X64 | spawner | ❰BUG❱ (ours; found 2026-11-14 by t/flavors.pl's level 2 under Wine: posix_spawn with the redirections only) On Windows, a setting the spawn primitive lacks was done around the call with POSIX's signal calls, which Perl has not there ("POSIX::sigemptyset not implemented"): every child of Proc::ShellSpawn, which asks for an empty sigmask, failed, and so did any child with a setting done around the call (the signals blocked meanwhile). With search missing, a program was not looked up on PATH at all (the lookup around the call was POSIX's only). Only Perl's own spawn (system1) had the Windows rules. Our win_spawn.h does these settings natively, so it showed only with them marked missing (PROC_SPAWNER_MISSING), as a copy of win_spawn.h that does less (Perl's, TODO A20) would have them. | Fixed post-0.12: on Windows, wherever the primitive lacks one, the Windows rules: sigdefault, resetids and an empty sigmask need nothing; pgroup 0 is a group of its own (win_new_group); another sigmask, pgroup, pidfd: unsupported; no signal blocking. search: through PATH and PATHEXT, as system1 (win_find). Test: t/flavors.pl under Wine (how: its header, and pspawn-spawner.md, section 8). |
| X65 | executor (Windows) | ❰BUG❱ (ours; found 2026-11-15 under Wine with Strawberry Perl 5.38.2.2, by t/portable.t once its record took the battery lines added since post-0.10) A shell started on Windows sees every variable it inherits under an upper-case name: Perl on Windows gives the names of %ENV in upper case (set lowvar=5 there: keys %ENV has LOWVAR), and run() takes its variables from %ENV. So export z=3; sh -c 'echo $z' prints an empty line there (sh is ours, SH1, a child Perl), export Z=3 works; the same with set -a, and through system1 with A=1 B=$(echo $A) sh -c …. A Perl child reads $ENV{z} fine (Perl's lookup ignores case). Linux: not affected. | Fixed post-0.12 (the user, 2026-11-15, A22 (a)): on Windows the shell takes the names as the process's environment block spells them (a small XSUB, Proc::Spawner::__win_env_names, over GetEnvironmentStringsW; the values still from %ENV), but PATH as PATH; PROC_SHELLSPAWN_ENVNAMES=upper gives the old way (A22 (b); pspawn-shell-windows.md, section 1). Checked under Wine: the three lines pass, t/portable.t passes; with upper, export z=3 reaches a child sh as $Z only. |
| X66 | measurement | ❰BUG❱ (ours; in make corpus-env-variants since post-0.09; found 2026-11-17) The runs with the environment varied (large-subset-environment.md, section 9) gave each sample to a worker by its place in the list of that run (directory /runcompare/wK, user rcK), so a sample mostly ran with another worker in a variant than in its base run (in the posix variant 337 of 443), and a sample whose output or calls hold the worker's directory or user (pwd, $HOME, ~, $USER, $0's directory: echo \pwd`/`dirname $0`, basename $(pwd), who | grep $USER) changed its result between the two though the variant had nothing to do with it; the second base run, which measures the noise, ran with the same workers as the first and did not show it. Seen when only part of the samples ran again (A24 (b)): 8 records of the variants differed only by that directory. | Fixed post-0.12: the variants and the second base run take each sample's worker from the base run; run again so (2026-11-17), the column "other result" of section 9 fell, as in posixfrom 13 to 2 and inoutput from 396 to 375; the class changes that came or went were each traced to timing, a race or A24 (b) (section 9) (large-subset-runcompare.pl -workers-from; [corpus.mk](corpus.mk)). | | <a id="my-x67"></a>X67 | spawner | **❰BUG❱** (ours; found 2026-11-18 reading [lib/Proc/Spawner.pm](../lib/Proc/Spawner.pm), not run) Where the C library's posix_spawn lacks one of the fd actions (dup2, close, open, closefrom), spawn_unsupportedmarks all of them, andchdir, fchdir, missing, so every fd action of every spawn is done in Perl's own process around the call (emulate_actions), even when the call asks for none of the missing kind: slower, and not thread-safe, where posix_spawn could do them itself. Hit: a C library without posix_spawn_file_actions_addclosefrom_np (glibc before 2.34, musl), and [t/flavors.pl](../t/flavors.pl)'s level 2, "posix_spawn with the redirections only", which lacks closefrom and so passes posix_spawn no fd action at all. | Open: first in the next cycle ([TODO](../TODO), B): decide per call. | | <a id="my-r1-r5"></a>R1–R5 | Run | See [Run's Changes, 0.05 and 0.06`](https://metacpan.org/release/ILYAZ/Run-0.07/changes). | Run 0.05 and 0.06. |
Corpus testing (X12), proposed and closed
The plan of 2026-11-01: every one-liner of the corpora run under dash and under the executor, with every program replaced by a reporter that logs what it was started with (argv, cwd, environment, fds, signals, group, umask) and passes its input on. Closed 2026-11-07 (the user): done another way, by the run-time comparison of dash, bash --posix and ours (large-subset-state.md, section 7; its limits: X27), whose recorders come from that reporter.