<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git/src, 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>added new benches, the logo, and a formal spec for possible verification.</title>
<updated>2026-11-20T21:21:12Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-20T21:21:12Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=b3879f5179e4a130f9668600e905f4c26842f5b8'/>
<id>urn:sha1:b3879f5179e4a130f9668600e905f4c26842f5b8</id>
<content type='text'>
</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>z/OS: load IGGCSI00 once and keep the block for the shell</title>
<updated>2026-11-20T00:28:13Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-20T00:28:13Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=a37d3adca684abd6ccca77c58732515efde9dd76'/>
<id>urn:sha1:a37d3adca684abd6ccca77c58732515efde9dd76</id>
<content type='text'>
The search interface was reached through LINK, which asked the system to
find and attach the module on every call -- and completion issues a call
per Tab.  The glue now LOADs the module on the first call, writes its
entry point into the block, and branches to it directly afterwards, and
the block itself is taken from 31-bit storage on the first search and
kept, because IGGCSI00 is AMODE 31 and all three of its addresses have
to stay below 2 GB.

The block is declared packed, so the compiler cannot add padding the
assembler's offsets do not know about, and aligned(8), so the save area
starts on a doubleword.  Its name field is spelled in IBM-1047 bytes
rather than as a C string, so the module is named the same way whatever
character mode this build runs in.

Verified on the machine: SYS1.MA* returns SYS1.MACLIB, SYS1.* returns
135 names, and Tab in an interactive shell completes //'SYS1.MA to
//'SYS1.MACLIB' and lists the members of that PDS.
</content>
</entry>
<entry>
<title>docs: keep the source ASCII, which the z/OS working tree needs</title>
<updated>2026-11-19T23:38:26Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-19T23:38:26Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=c8ed6c77ff379678c7b24866d711eeb7fda59dbd'/>
<id>urn:sha1:c8ed6c77ff379678c7b24866d711eeb7fda59dbd</id>
<content type='text'>
</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>docs: say it in short sentences</title>
<updated>2026-11-19T00:04:28Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-19T00:04:28Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=d51368ffc48a1521796e5f582b489306da5fd5ce'/>
<id>urn:sha1:d51368ffc48a1521796e5f582b489306da5fd5ce</id>
<content type='text'>
DESIGN.md, README.md and the Doxygen comments leaned on semicolons to
join clauses and on trailing "which" clauses to add afterthoughts. Both
read as machine-written prose. Each joined clause is now its own
sentence, and the afterthoughts are either part of the sentence or a
sentence of their own.

Also corrected: README said C11 in two places (the tree builds C17), the
completion section still described the pre-HLQ-rule filters and the
64-call resume limit, and the z/OS job-control note still called
SPAWN_SETTCPGRP unverified.
</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>
