<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git/tests, branch fix/zos-spawn-fdmap</title>
<subtitle>Fast Almquist-family POSIX shell for z/OS UNIX with bundled libedit</subtitle>
<id>https://git.abendless.com/zash.git/atom?h=fix%2Fzos-spawn-fdmap</id>
<link rel='self' href='https://git.abendless.com/zash.git/atom?h=fix%2Fzos-spawn-fdmap'/>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/'/>
<updated>2026-11-23T17:09:45Z</updated>
<entry>
<title>z/OS: keep a close-on-exec pipe out of the child's fd map</title>
<updated>2026-11-23T17:09:45Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-23T17:09:45Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=92fb4b12ac631ce5c794e5b5b29f204f34ab9e59'/>
<id>urn:sha1:92fb4b12ac631ce5c794e5b5b29f204f34ab9e59</id>
<content type='text'>
sys_pipe() duplicates the shell's pipe ends above SYS_NFD and marks them
FD_CLOEXEC, so that other children do not inherit them.  spawn()'s fd_map
hands the child the parent's descriptor as it is, without clearing the
flag the way dup2() would, so a mapping onto the child's 0..2 carried
FD_CLOEXEC into the child.  The child could still write, but the next
exec inside it lost stdout: ps printed

    FSUM6004 write error on standard output: EDC5113I Bad file descriptor

and a #!/bin/sh shim lost the pipe it was given.

Pass a plain duplicate, which fcntl F_DUPFD makes above SYS_NFD without
the flag, for every map entry that names a different descriptor, and
close the duplicates once spawn() has made the child.  Entries that map
a descriptor onto itself are untouched.

tests/zos/fdmap.sh records the case: a pipe the shell made, read by a
child that execs.

Reported in #1.
</content>
</entry>
<entry>
<title>z/OS: run 31-bit and load IGGCSI00 through the C library</title>
<updated>2026-11-23T17:09:32Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-23T17:09:32Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=d1ea4c7f4530e3d1d4689a9d20029a0c1a418df5'/>
<id>urn:sha1:d1ea4c7f4530e3d1d4689a9d20029a0c1a418df5</id>
<content type='text'>
zash was AMODE 64, so calling the AMODE 31 IGGCSI00 needed assembler
glue (zos_csi.s) that switched addressing mode around the branch.  Built
with -m32 the program is 31-bit itself: the call goes through a plain
function pointer, the work area and the saved registers live in one
31-bit block in C, and the glue is gone.

The rest of the tree follows the change: the build, the off-z/OS lint
shim, DESIGN.md and README.md, the benches, the Lean spec of the
pattern matcher, and the tests that recorded what the extra address bits
had changed.
</content>
</entry>
<entry>
<title>docs: say 31-bit, not below the bar</title>
<updated>2026-11-20T00:38:39Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-20T00:38:39Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=b4d7dc383a513ef417f45fab0acb3ba6b8af0d45'/>
<id>urn:sha1:b4d7dc383a513ef417f45fab0acb3ba6b8af0d45</id>
<content type='text'>
"Below the bar" means below 16 MB, the 24-bit range.  IGGCSI00 needs
31-bit addresses, so the block has to stay below 2 GB -- two very
different limits.  Corrected where the two had been confused.
</content>
</entry>
<entry>
<title>exec: run a subshell in process when its body cannot change anything</title>
<updated>2026-11-19T23:37:25Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-19T23:37:25Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=f5f5683fc23876e66bdf31ba72ce6df3d430fc1b'/>
<id>urn:sha1:f5f5683fc23876e66bdf31ba72ce6df3d430fc1b</id>
<content type='text'>
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 &lt;noreply@anthropic.com&gt;
</content>
</entry>
<entry>
<title>tests/zos/ebcdic: drop the external sort from the collation test</title>
<updated>2026-11-19T01:01:22Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-19T01:01:22Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=656fadb9631cdbc1a2a469bdff0acf39978420fb'/>
<id>urn:sha1:656fadb9631cdbc1a2a469bdff0acf39978420fb</id>
<content type='text'>
/bin/sort collates by the environment's collation, not by EBCDIC byte
order, so on z/OS it put the digits first and the test failed the first
time it ran in the EBCDIC build.  The shell's own ordering, which is what
the test is for, is checked above it.
</content>
</entry>
<entry>
<title>tests/zos/security: ask whether the redirect was refused, not how</title>
<updated>2026-11-19T00:13:38Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-19T00:13:38Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=8dfa69877bedafd6d5b83754252065ded33abb90'/>
<id>urn:sha1:8dfa69877bedafd6d5b83754252065ded33abb90</id>
<content type='text'>
zash exits 1 for a failed redirection on Linux and 2 on z/OS (the errno
is mapped differently there).  What the test is about is that the
command fails, not the number it fails with.
</content>
</entry>
<entry>
<title>tests/zos/security: set PATH, and drop the read-only directory check</title>
<updated>2026-11-19T00:11:41Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-19T00:11:41Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=1d7b0e126f6c7b5373c0dd405c3c986ebdbfb42e'/>
<id>urn:sha1:1d7b0e126f6c7b5373c0dd405c3c986ebdbfb42e</id>
<content type='text'>
z/OS profiles end PATH with a colon, which POSIX reads as the current
directory, so the PATH check passed for the wrong reason there.  The
ZFS test also let the owner create files in a directory it had just
chmod'ed 500, so that check proved nothing on the machine it was written
for.  A redirection into a missing directory tests the same error path
and is refused everywhere.
</content>
</entry>
<entry>
<title>Readme icon and contents, a security test, realistic bench scripts</title>
<updated>2026-11-19T00:10:36Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-19T00:10:36Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=b0f3aacedd6d1ebacbc774767611cdef0ac6761c'/>
<id>urn:sha1:b0f3aacedd6d1ebacbc774767611cdef0ac6761c</id>
<content type='text'>
README.md shows the shell's icon on a light or dark background, has a
table of contents, and says C17 rather than C11 (the tree has built C17
since b4d6bf1).

tests/zos/security.sh is the security-relevant half of the suite: a file
created by redirection or mkdir takes the umask, a redirect into a
directory without write permission fails, the current directory is not
searched for a command, ENV is not read by a non-interactive shell, and
neither an expansion nor a file name is re-parsed.

bench/report.sh counts a generated log by level and hour, and
bench/deploy.sh renders and verifies 100 configs from a template. Both
are realistic scripts and both are compared for output against other
shells by bench/run.sh, so they fail as tests as well as being timed.
</content>
</entry>
<entry>
<title>completion: no catalog search until a high-level qualifier is complete</title>
<updated>2026-11-18T23:49:34Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T23:49:21Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=199f4059adbcfbd8a54d28a2f4a4ff34b0857e84'/>
<id>urn:sha1:199f4059adbcfbd8a54d28a2f4a4ff34b0857e84</id>
<content type='text'>
A filter whose first qualifier is generic makes Catalog Management
resolve aliases generically, and the manual warns that a generic
high-level qualifier can select several catalogs at once: a high-level
of "**" means every user catalog.  Tab is no reason to ask that of the
catalog address space, so completion waits until a whole high-level
qualifier is typed before it searches at all.

The searches are narrower too: entry types U (user catalog connector)
and X (alias) are excluded, since they are not data set names; the
required return-area length is checked before a resume, as Managing
Catalogs asks; and the editor lists at most one screenful of
candidates, with a count of the rest, instead of a fixed 200.
</content>
</entry>
<entry>
<title>z/OS: one catalog per completion search, and stop after two calls</title>
<updated>2026-11-18T23:18:39Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T23:18:39Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=f0459b1227422965820c039d6d6b64336b7f1151'/>
<id>urn:sha1:f0459b1227422965820c039d6d6b64336b7f1151</id>
<content type='text'>
CSIS1CAT keeps a generic high-level qualifier from fanning a Tab key out
over every alias it matches plus the master catalog, which is what
Managing Catalogs warns about for CSIFILTK with generic filters.

Two IGGCSI00 calls already return about 2200 names -- one call fills the
64000-byte work area with ~1100 -- so 64 was sweeping a whole catalog per
keystroke for names no screen could show.

Also: `//'&lt;tab&gt;` searched for "*" and "*.*" before the filter check
refused them; it now returns before allocating anything, and tests/run.sh
can compare an EBCDIC build's transcript against a .ebcdic.exp.
</content>
</entry>
</feed>
