From 92592e25b6fabd0e64188f28c3dd4d935b542f11 Mon Sep 17 00:00:00 2001 From: Luis <42945842+ldiaz94@users.noreply.github.com> Date: Fri, 23 Oct 2026 13:53:57 +0100 Subject: [PATCH] PROPOSALS.md: what is left out confirmed; raz-lib: a signal before wait, by catch and ready --- diff --git a/PROPOSALS.md b/PROPOSALS.md index 2a0c1cf..272e8b8 100644 --- a/PROPOSALS.md +++ b/PROPOSALS.md @@ -2878,12 +2878,14 @@ **Recommendation:** take; it makes `Doc man` serve any library, and `Doc.raz` loses its fixed text and its date. -## Left out, to confirm +## Left out -What the collation of 2026-10-22 recommends leaving out, each with its -reason. The owner confirms or moves an item into a proposal; what is -confirmed is marked "Not planned" in `~/r/RAZ-GAPS.md`. +What the collation of 2026-10-22 recommended leaving out, each with its +reason; it is marked "Not planned" in `~/r/RAZ-GAPS.md`. +**Status.** Confirmed by the owner on 2026-10-23, but for the exported +array, parked with `[]const T`. + ### The language @@ -2892,7 +2894,7 @@ - Records don't compare with `=` — padding, reals (`-0.0`, NaN) and slices make a byte compare wrong; a `same` procedure says what equal means. Confirmed by the owner, 2026-10-22. - No type of its own for an array — a one-field record keeps two hashes apart, as it keeps generic arrays (owner's idiom). - No exporting a record's fields as a whole — each `*` is the reader's mark of what is public; `Mxlib` is a C mirror, made by a program. -- An exported array can't be read as a slice outside its module — a slice can be written through; "A slice that can't be written: `[]const T`" in PROPOSALS.md would answer it. +- An exported array can't be read as a slice outside its module — a slice can be written through; "A slice that can't be written: `[]const T`" in PROPOSALS.md would answer it. Parked by the owner on 2026-10-23, with `[]const T`, for the safety thaw. - An exported variable can't be assigned from outside — Oberon's read-only export; a setter shows who writes. - A generic instance isn't reachable through the module that imported it — no bug: an import's name is never exported (3); export a type of the instance, or import it again. - `I32` doesn't widen to `INT` — `INT` may be 16 bits (5.1), so the widening would not hold everywhere. @@ -2929,7 +2931,7 @@ answered: `catch` SIGCHLD with the others and wait in `ready` on catch's fd (child, signal or deadline at once), then `wait(pid, false)`; `ignore(sig, false)` gives a caught signal its default back. - Worth a paragraph in the library volume, not a procedure. + Worth a paragraph in the library volume (written there), not a procedure. - No word from the kernel when a file changes — inotify is Linux's, with no match in the C backend's other systems or Moss; a 300 ms look serves. diff --git a/doc/raz-lib.md b/doc/raz-lib.md index 1d55ba1..904b233 100644 --- a/doc/raz-lib.md +++ b/doc/raz-lib.md @@ -616,6 +616,15 @@ so, as a program in the background or under `nohup` finds `sigInt` and `sigHup`: it should leave those alone, and `handle` or `catch` the rest. +To wait for a child, a signal or a time, whichever is first, `catch` +`sigChld` with the other signals and wait in `ready` on `catch`'s fd: +a child that ends makes `sigChld` ready there, as a signal that came +before the wait does, since `catch` holds it until `caught` takes it, +so none falls between a `wait` that found nothing and the sleep after +it. When the fd is ready, call `caught`, then `wait(pid, false)`. +`handle` can't do this: a signal noted just before the call it should +break isn't seen by it. + `handle` is for a program that must see a signal while it waits in a system call, as a shell waiting for its foreground program, or for a key, sees Ctrl-C: the signal is noted, and the call it comes during,