* [ANNOUNCE] mises v0.41.0: redirection and pipelines in the shell
@ 2026-07-23 23:21 kaguya3311
0 siblings, 0 replies; only message in thread
From: kaguya3311 @ 2026-07-23 23:21 UTC (permalink / raw)
To: [email protected]
[-- Attachment #1: Type: text/plain, Size: 1732 bytes --]
Mises v0.41.0 is tagged. user/sh now does redirection and N-stage
pipelines — the shell half of the POSIX-plumbing track, and the payoff
of fd inheritance (v0.39) and dup/dup2/pipe (v0.40).
cat f > g stdout to a file (create, truncate)
cat f >> g stdout appended
sort < in stdin from a file
a | b | c an N-stage pipeline
Three of the four operators are pure userland over the existing calls.
`>>` was not: a writable open starts its cursor at 0, so a write
overwrites, and there is no lseek. So this adds one open flag, O_APPEND
(0x400) — additive, since open already ignores unknown flag bits, so no
existing binary changes and the ABI-break window stays open. cat gained
a `-` operand (read stdin) so `<` and `|` have a consumer; it is opt-in
because a terminal still cannot say EOF (no Ctrl-D, no signals).
The executor spawns each pipeline stage's writer before its reader and
closes each pipe's write end before the next stage (or the reader never
sees EOF), and spawns every stage before waiting on any (or a full
one-page pipe deadlocks) — both forced by the missing O_CLOEXEC. The
shell stays allocation-free per line; the whole line is validated before
anything runs.
Still deliberately not a full POSIX shell: no quoting, globbing,
variables, job control or Ctrl-C. Those want signals — the next item.
tests/redir.rs types the operators at the machine and reads six
artifacts back; it also checks the shell survives a syntax error, that a
pipeline's status is its last stage's, and that no fd description or pipe
leaks. writetest gains an O_APPEND check. Suite: 364 [ok], 0 failed,
0 warnings.
Rationale and invariants: docs/DECISIONS/0052-shell-redirection-and-pipelines.md
git tag v0.41.0 (832f2f7)
kaguya
[-- Attachment #2: Type: text/html, Size: 3268 bytes --]
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-23 23:22 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-23 23:21 [ANNOUNCE] mises v0.41.0: redirection and pipelines in the shell kaguya3311
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox