* [ANNOUNCE] mises v0.44.0: job control, or a keystroke that reaches a whole pipeline
@ 2026-07-24 19:22 kaguya
0 siblings, 0 replies; only message in thread
From: kaguya @ 2026-07-24 19:22 UTC (permalink / raw)
To: mises-devel
v0.44.0 is tagged. It is the second half of ADR-0048's item 4, and it closes
that item on the kernel side.
v0.43 gave Mises signals and deliberately stopped short: five signal numbers,
one `kill` argument form and `SIGSTOP`'s uncatchability were reserved and
*refused*, so that turning them on later could not quietly change what a
program already written meant. This release turns them on.
What you can do now that you could not before:
* ^C reaches a process GROUP. `cat big | grep x | wc` is three processes and
one job; one keystroke ends all three and nothing else.
* ^Z suspends a job, and it resumes. A stopped process is still killable.
* A background process cannot steal a line typed at the foreground one -- it
is stopped by SIGTTIN instead. This is the hazard ADR-0046 could only solve
by deleting one of the two shells; it is now solved for every program.
* ^D. A terminal can finally say end-of-file, which is what a no-operand
`cat` has been waiting for since v0.39.
Three decisions were settled before any code was written.
The kernel half lands now and the shell half in v0.45 -- the v0.40 -> v0.41
split repeated. `user/sh` does not yet own job control: no job table, no `&`,
no jobs/fg/bg. That is pure userland work now.
`0x05 waitpid` is reshaped to POSIX: waitpid(pid, statusp, flags) -> pid, with
the historical Unix status word carrying exited / killed / stopped in one
register, -1 for any child, and WNOHANG/WUNTRACED. This is a real ABI break.
It was taken now because the window stays open exactly until `rb` installs a
package built elsewhere -- `build.rs` rebuilds the whole user/ workspace
against the kernel, so today no binary can disagree. It cost the tree nothing:
libmises::waitpid(tid) was kept as a convenience over the new call with its old
signature and its old meaning, so all ~20 in-tree callers are untouched. The
ABI broke; the idiom did not. That is the pattern to reuse when `stat` grows
real fields.
A shell will place children with fork + setpgid + execve rather than a new
kernel argument. spawn_argv hands back a tid for a child that is *already
running*, so both sides calling setpgid with the same value is what closes the
placement race by construction -- and it is what v0.42 built the pair for.
New calls: 0x0C getppid, 0x0D setpgid, 0x0E getpgid (0x0F reserved for setsid
-- a controlling terminal properly belongs to a session, and Mises has one
terminal), plus 0x53 tcgetpgrp / 0x54 tcsetpgrp in the descriptor band, where
they belong because they take an fd rather than a pid. SysError gains EPERM,
EIO and ECHILD.
Still reserved and refused, so nothing has to be un-promised later: sessions,
kill(-1, ..) (its POSIX meaning would include PID 1 on a system with no
privilege separation), waitpid's process-group forms, WCONTINUED, and orphan
reparenting.
Two findings from the ten bug-injections, both outside the code under test:
* A spawn race five versions old. exec::spawn_path publishes a Ready task and
only then gives it fds and a signal state; the timer can schedule the child
in between, and a child with no signal state reads as "every signal is
ignored". It was safe only because every caller until now happened to spawn
with preemption off. The new test is the first that does not, and it hit
the race one run in three.
* A test that polled for the wrong property. tests/redir.rs waited for an
artifact to *exist* before sampling its leak counters -- but `> file` is the
shell's own O_CREAT, which happens before the command is even spawned. It
had been latent for three versions.
Verified by user/jobtest (ten checks) and tests/jobctl.rs (eight assertions,
five of them kernel-side properties a ring-3 probe cannot reach -- ^C, ^Z and
^D arrive as real scancodes at the keyboard ISR's own entry point), plus two
new kern::signal unit tests.
393 [ok], 0 failed, 0 warnings, `cargo test` exit 0.
Rationale, alternatives weighed and the full invariant list: ADR-0055
(docs/DECISIONS/0055-job-control.md).
This is the first version using Anthropic's new Opus 5! It is visibly
performing way better than Opus 4.8 and I look forward to good things
from it.
--
kaguya
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2026-07-24 19:23 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-07-24 19:22 [ANNOUNCE] mises v0.44.0: job control, or a keystroke that reaches a whole pipeline kaguya
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox