<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git/src, branch fix/zos-script-charset</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-script-charset</id>
<link rel='self' href='https://git.abendless.com/zash.git/atom?h=fix%2Fzos-script-charset'/>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/'/>
<updated>2026-11-25T18:19:41Z</updated>
<entry>
<title>z/OS: convert a script's character set only in an ASCII build</title>
<updated>2026-11-25T18:19:41Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T18:19:41Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=5d830cb1c04da59553d3af848340162a7be9fa58'/>
<id>urn:sha1:5d830cb1c04da59553d3af848340162a7be9fa58</id>
<content type='text'>
input_push_fd() called sys_input_cvt() for every script on z/OS, and that
routine converts to the program's own CCSID.  In an ASCII build reading
an IBM-1047 system it therefore either asked for EBCDIC-to-EBCDIC
conversion, which is a no-op that returns 0, or read the bytes
unconverted; SETCVTON on a descriptor that sys_dupfd() has renumbered
returns 0 and converts nothing on this system either.  The parser then
saw EBCDIC and dropped the script.

An EBCDIC build reads IBM-1047 natively and never wanted the call.  With
the conversion left to ASCII builds, posix/traps and scripts/signals pass
on z/OS: 93 passed, 4 skipped, 0 failed.

The untagged-file case still depends on SETCVTON with an explicit fccsid,
which is unverified, so the VERIFY note stays.
</content>
</entry>
<entry>
<title>C23: nullptr for null pointers, constexpr for typed constants</title>
<updated>2026-11-25T06:31:26Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T06:30:44Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=c7f23b8a5fb86f8df51809aca64415bcadcaa9f6'/>
<id>urn:sha1:c7f23b8a5fb86f8df51809aca64415bcadcaa9f6</id>
<content type='text'>
nullptr in every place a null pointer constant was meant; NULL is gone
from src/.

constexpr where it improves on #define without costing anything: the
IGGCSI00 work-area offsets and sizes, and the scalar sizes MVS_DSN_MAX,
CSI_FIELD_LEN, CSI_WORK_MIN, PDS_DIRBLK, CSI_WORK, CSI_MAX_CALLS.  A
constexpr in C is a constant expression, so it still bounds the arrays
that use it, and it now carries a type and can be checked with
static_assert.  Feature switches (#if), the CSIETYPE/EBCDIC byte
constants read as octets, and the related-constant enum sets stay as
they were.
</content>
</entry>
<entry>
<title>C23: compile as C23 and use its spelling</title>
<updated>2026-11-25T06:17:57Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T06:17:57Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=122dd54f6d915240cd5327d08f9b36e243983956'/>
<id>urn:sha1:122dd54f6d915240cd5327d08f9b36e243983956</id>
<content type='text'>
The z/OS toolchain would not take C23 when this was first written; IBM
Open XL C/C++ 2.2 does (clang 21.1, __STDC_VERSION__ 202311), and so
does the clang on Linux.  -std=c23 in the Makefile, and the standard
attributes in place of the ones that were macros:

  _Noreturn      -&gt; [[noreturn]] (on declarations and definitions)
  _Static_assert -&gt; static_assert
  _Alignas       -&gt; alignas
  NODISCARD      -&gt; [[nodiscard]]
  FALLTHROUGH    -&gt; [[fallthrough]]

PRINTFLIKE and UNREACHABLE() stay macros: [[gnu::format]] and
[[gnu::unreachable]] are vendor attributes, and the standard has no
[[format]] or [[unreachable]] for a header-only project yet.

Standard-library additions newer than the libc of either system
(&lt;stdbit.h&gt;, &lt;stdckdint.h&gt;) are not used, so gcc -std=c2x still builds
the tree warning-free.  The suite, ASan/UBSan and the z/OS lint pass as
before; linux/i-dscomplete remains the one local failure it was on
main.
</content>
</entry>
<entry>
<title>build: 64-bit on z/OS</title>
<updated>2026-11-25T05:21:27Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-25T05:21:27Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=da07f0274c8c92e0ff5f2e4a66fb867a12f2cf08'/>
<id>urn:sha1:da07f0274c8c92e0ff5f2e4a66fb867a12f2cf08</id>
<content type='text'>
The 31-bit choice existed for one reason: a 64-bit start cost 29 ms
against 1 ms and a 64-bit fork() 4.2 ms against 0.10.  That was the
64-bit C run-time being loaded out of CEE.SCEERUN2 on the linklist on
every start; with CELQ* in the dynamic LPA both widths cost 1.5 ms and
fork() 0.10 ms (notes/investigation.md has the before and after).

So build the shell at the width IBM builds for: -m64 for both the
ASCII and the EBCDIC build, and for the debug build.

OS_UPSTACK does not exist at -m64, so the two AMODE 31 services
(IGGCSI00, BPXWDY2) are declared with plain OS linkage, which is what
the 64-bit glue implements.  IGGCSI00's VL bit is set from the width of
a pointer now, not with 0x80000000.  Neither module loads on this
system, so the linkage itself stays unverified; csi_call() still traps a
program check and retires the catalog if it abends.
</content>
</entry>
<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>
</feed>
