<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git/tests/zos/fdmap.sh, 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-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: test a spawn with the script's whole descriptor range open</title>
<updated>2026-11-18T23:05:49Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T23:05:44Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=79141a999257c915bf9987e32c7530a67700cab1'/>
<id>urn:sha1:79141a999257c915bf9987e32c7530a67700cab1</id>
<content type='text'>
A script owns descriptors 0..SYS_NFD-1 and the shell's own live above
them, so filling 3..9 is as far as a script can go; the spawn map keeps
the terminal duplicate reachable past them.  The earlier '64' map was
guessing at a case the shell cannot present: back to SYS_NFD+16.
</content>
</entry>
<entry>
<title>z/OS: a wider spawn map, and the suite runs both builds</title>
<updated>2026-11-18T21:13:09Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-18T21:13:09Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=0d69168ada30c4b584a6c3aa77640d2b396d9599'/>
<id>urn:sha1:0d69168ada30c4b584a6c3aa77640d2b396d9599</id>
<content type='text'>
The map carried SYS_NFD+16 descriptors, so a script holding more pushed
the terminal's duplicate out of reach and its commands lost the
controlling terminal.  64 leaves room.

`make zos-check` now builds the EBCDIC program too and runs the
character-set tests against it, which nothing did before.
</content>
</entry>
<entry>
<title>zash: scripting core, test suite and benchmarks</title>
<updated>2026-11-12T17:42:49Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-12T17:42:49Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=c3b270f82dd62a56e9d75cdd652c55a694a2da64'/>
<id>urn:sha1:c3b270f82dd62a56e9d75cdd652c55a694a2da64</id>
<content type='text'>
A clean-slate POSIX shell for z/OS UNIX in the Almquist tradition, written
in C23 for Clang (Linux) and IBM Open XL C/C++ (z/OS).

- Parser, expansion, arithmetic, redirection, traps and builtins.
- Spawn-first execution: fd plans instead of fork+dup2, in-shell pure
  builtins for pipelines and command substitution, $(a | b) without a
  subshell.
- Flat .POSIX Makefile; asan, valgrind, bench, compdb and z/OS targets.
- Tests: posix (dash-generated), zash, process accounting, linux, zos.

Nothing has been compiled or run on z/OS yet.
</content>
</entry>
</feed>
