<feed xmlns='http://www.w3.org/2005/Atom'>
<title>zash.git/src, branch main</title>
<subtitle>Fast Almquist-family POSIX shell for z/OS UNIX with bundled libedit</subtitle>
<id>https://git.abendless.com/zash.git/atom?h=main</id>
<link rel='self' href='https://git.abendless.com/zash.git/atom?h=main'/>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/'/>
<updated>2026-11-29T16:29:29Z</updated>
<entry>
<title>Record waited job status in reaped_list before freeing in builtin_wait</title>
<updated>2026-11-29T16:29:29Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-29T16:29:29Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=85f76423cda9977b42f3c098a23286c928861e4b'/>
<id>urn:sha1:85f76423cda9977b42f3c098a23286c928861e4b</id>
<content type='text'>
When 'wait pid' waits directly on a still-running job rather than
reading an already-reaped entry, record its pid and status via
reaped_add() before calling job_free(), matching jobs_reap(), bash, and
dash. Fixes intermittent 'again: 127' failures in tests/posix/wait-reap
on busy z/OS hosts when 'false &amp;' takes &gt;0.3s.
</content>
</entry>
<entry>
<title>Add regression tests for audit fixes and clear clang-tidy findings</title>
<updated>2026-11-29T04:02:44Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-29T04:02:44Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=3ded9a80de9a487bcae31c695740d82d1a0e13fd'/>
<id>urn:sha1:3ded9a80de9a487bcae31c695740d82d1a0e13fd</id>
<content type='text'>
- Add tests/zash/audit-fixes.{sh,exp} covering uppercase bases, closed-fd
  duplication, [[ ...  ]] and nested here-docs, quoted braces,
  'for x; in', environment deduplication, PS4 expansion, pure subshell
  write errors, pipeline unwind loop_depth, 'set +o', POSIX 1-4 arg test
  rules, print -u bounds, whence -p, printf overflow and bare %b NULs,
  time/select keywords, '--' handling, unalias -- -a, kill --, and read -t 0.
- Clear remaining clang-tidy warnings on changed lines in edit_builtin.c,
  sys_posix.c, test.c, and var.c.

Verified on Linux (./zash and ./zash-asan); z/OS CBT verification next.
</content>
</entry>
<entry>
<title>Fix builtin, signal, test, printf, option, and job-control bugs</title>
<updated>2026-11-29T03:58:27Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-29T03:58:27Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=59825a1acf69acb5b47f0471ff8929294c48b942'/>
<id>urn:sha1:59825a1acf69acb5b47f0471ff8929294c48b942</id>
<content type='text'>
- Skip startup-only options in options_print() for 'set +o'.
- Preserve ignored SIGINT traps in trap_reset_child()/trap_reset_exec(),
  rescan signals from 1 on trap_poll() unwind, and accept '--' after the
  signal operand in kill.
- Implement POSIX 1-4 argument test/[ rules and bound-check -t fds.
- Bound-check 'print -u' against SYS_NFD and require regular files in
  'whence -p' with '/'.
- Report ERANGE overflow in printf integer/float conversions and preserve
  embedded NUL bytes in bare %b.
- Use exc_catch() in builtin_cd_isolated(), check sys_dupfd() in '.',
  include time/select in is_keyword(), poll with timeout 0 for 'read -t 0',
  accept '--' in eval/export/readonly/umask/unalias/wait/fg/bg, return on
  trapped signal during operand wait, and reap jobs in fg/bg.

Verified locally on Linux (make, make zos-lint, make check: 128/129 pass).
</content>
</entry>
<entry>
<title>Fix redirection, parser, arithmetic, environment, and exec bugs</title>
<updated>2026-11-29T03:58:27Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-29T03:58:27Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=eb8f9331cd2f0c240ba1323ef136b31611215f29'/>
<id>urn:sha1:eb8f9331cd2f0c240ba1323ef136b31611215f29</id>
<content type='text'>
- Fail cleanly in save_fd() when sys_dupfd() fails with errno != EBADF,
  check moved &lt; 0 in plan_redirs()/plan_apply(), and reject duplicating
  from closed descriptors in plan_redirs().
- Accept uppercase digits in parse_based() for bases &lt;= 36 while keeping
  ksh case-sensitive digits for bases 37..64.
- Save and restore in_cond, alias_ended_blank, and here_head/here_tail in
  parse_cmdsub() and parse_substring(); parse inner double quotes inside
  "${x:-...}" via read_double_quoted(); reject 'for x; in ...'.
- Deduplicate repeated temporary assignments in var_environ_with().
- Use access(X_OK) in path_search(), expand PS4 in xtrace() with recursion
  guarded, report stdout write errors in run_pure()/eval_subshell(), and
  restore loop/dot/func depth and skip_kind on eval_pipe() error unwind.

Verified locally on Linux (make, make zos-lint, make check: 128/129 pass).
</content>
</entry>
<entry>
<title>Fix z/OS 64-bit linkage/storage, EBCDIC, editor, and checkout issues</title>
<updated>2026-11-29T03:58:27Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-29T03:58:27Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=b97207f7e5dd3d8d147da525ede1ba3609f5c983'/>
<id>urn:sha1:b97207f7e5dd3d8d147da525ede1ba3609f5c983</id>
<content type='text'>
- Guard #pragma linkage with _LP64 (OS on -m64, OS_UPSTACK on -m32), use
  bit 31 (0x80000000u) for the OS VL bit, and allocate IGGCSI00/BPXWDY2
  work areas via __malloc31() per z/OS C/C++ Runtime Library Reference and
  Open XL C/C++ 2.2 Compiler Reference.
- Use isupper()/isdigit() in complete.c hlq_ok() and an EBCDIC/ASCII-safe
  ctrl_byte() helper in edit_builtin.c bind_keys().
- Tag temp files with sys_tmp_tag() in fc_edit() and edit_external(), add
  EINTR retry loops in edit_external(), route edit_bind_list() through
  out1, and clamp CSI/vi repeat counts against signed int overflow.
- Destroy posix_spawn_file_actions_t on error in sys_spawn() and clamp
  put_name() copy length in sys_posix.c.
- Replace non-ISO8859-1 dashes in README.md and C-PROGRAMMING-STANDARDS.md
  and mark notes/review-2026-11-27.md UTF-8 in .gitattributes so git
  checkout succeeds on z/OS.

Verified locally on Linux (make, make zos-lint, make check: 128/129 pass,
only pre-existing linux/i-dscomplete differs); z/OS CBT verification next.
</content>
</entry>
<entry>
<title>Merge main into perf/cd-inproc: one in-process `( cd dir )`, not two</title>
<updated>2026-11-28T20:34:40Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-28T20:34:40Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=78d73092a29cca7e3ce4ef6b5e2c6cd244f40202'/>
<id>urn:sha1:78d73092a29cca7e3ce4ef6b5e2c6cd244f40202</id>
<content type='text'>
main gained an in-process `( cd dir )` of its own with the 2026-11-28
review merge (the uncommitted working tree the review was written
against, committed as cb1688f), so this branch and main both replaced
the fork for the same command, in two places.

That copy has a defect this branch guards against: with

    readonly PWD; ( cd / ); echo after

the readonly assignment raises out of the saved-cwd block and kills the
whole shell - no `after` - where dash and bash both print it (dash rc=2,
bash rc=1). `subshell_in_process()` here refuses to run the `cd`
in-process unless PWD and OLDPWD are plain, and `builtin_cd_isolated()`
holds its own exception handler, so the fork still happens in that case.

Resolution: keep this branch's implementation and drop main's ad-hoc
branch in eval_subshell() together with the curdir_invalidate() helper
added for it, which had no other caller. The tests main brought with it
(tests/zash/subshell-cd.sh, tests/proc/subshell-pure.sh) still pass.

Verified on Linux (7.3.4-300.fc45.x86_64, 2026-11-28): make check 127
passed / 1 skipped / the known linux/i-dscomplete failure, make asan and
make valgrind the same, make mvs-asan 127 passed, make zos-lint clean,
the readonly-PWD case now matches dash. Not re-run on cbt.
</content>
</entry>
<entry>
<title>perf(pattern,printf): skip the class table on ASCII, a bare %s through vsnprintf</title>
<updated>2026-11-28T06:50:57Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-28T06:50:57Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=d60c99985c1c4e058dd2de7e6272ef4d48a14686'/>
<id>urn:sha1:d60c99985c1c4e058dd2de7e6272ef4d48a14686</id>
<content type='text'>
in_range() looked the two ends of `[a-z]` up in the alpha/digit tables to
get alphabet order.  In ASCII the code order *is* the alphabet order, so
the compiler can take one comparison; the tables stay for EBCDIC.

convert() formatted a bare "%s" through the spec builder and vsnprintf(),
which pads, truncates and checks flags it was never given.  Out it goes
straight to out_puts(); anything with a flag, width or precision still
takes the general path.

make check unchanged (126 passed, 1 skipped, known linux/i-dscomplete);
the whole suite under ASan+UBSan reports nothing.
</content>
</entry>
<entry>
<title>perf(glob): do not lstat() a component readdir() just named</title>
<updated>2026-11-28T06:48:18Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-28T06:48:18Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=3abe682147f74104f1f1225e8c142b80018e17e7'/>
<id>urn:sha1:3abe682147f74104f1f1225e8c142b80018e17e7</id>
<content type='text'>
The last component of a pattern was matched by readdir() and then stat'ed
again by the recursive call, only to learn that the name it had just read
exists.  When nothing follows the component, add it straight away; a
literal tail and a trailing `/` still go through lstat(), the second
because `*/` must not match a file.

Measured on Linux (x86-64) with 3000 names in one directory and
`set -- d/*` run 200 times: 0.20 s before, 0.05 s after, three runs each,
same result count.

make check unchanged (126 passed, 1 skipped, the known
linux/i-dscomplete failure on this machine).
</content>
</entry>
<entry>
<title>fix(signal): install SIG_DFL with sigaction, not signal()</title>
<updated>2026-11-28T06:44:42Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-28T06:44:42Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=270ac6676c05470223c5fc09fb3230b97acfbe2b'/>
<id>urn:sha1:270ac6676c05470223c5fc09fb3230b97acfbe2b</id>
<content type='text'>
Two places reset a signal to its default: main() for an inherited SIGCHLD
(waitpid() fails with ECHILD when a parent left it ignored) and the
pipeline child that writes a long builtin output and must die on SIGPIPE.
Both went through signal(), which differs from sigaction() in restart and
mask behaviour; they now share trap.c's set_handler() through a small
trap_sig_default(), the function trap_reset() already uses.
</content>
</entry>
<entry>
<title>fix(redir): reject a TMPDIR too long for the here-document path</title>
<updated>2026-11-28T06:44:42Z</updated>
<author>
<name>Sean Kurtz</name>
<email>seankurtz75@gmail.com</email>
</author>
<published>2026-11-28T06:44:42Z</published>
<link rel='alternate' type='text/html' href='https://git.abendless.com/zash.git/commit/?id=de0d26a1e6b2916996867c4c11f5146302720587'/>
<id>urn:sha1:de0d26a1e6b2916996867c4c11f5146302720587</id>
<content type='text'>
The snprintf() into path[PATH_MAX] was unchecked: with a TMPDIR longer than
that, the name was truncated and mkstemp() could be pointed at a different
directory than the one meant.  The length is now checked and the here
document falls back to the pipe it already uses on failure.
</content>
</entry>
</feed>
