Take up openkal 0.11's unit: a handle the caller holds, not a flag - #17
Merged
Conversation
…hiding⚠️ ⚠️ THIS IS WHERE THE MISSING MODIFIER WAS ALREADY VISIBLE, and it is recorded rather than quietly fixed. This kernel has no `execveat', so a program named relative to a directory has always been started by ENTERING that directory first. A started program's working directory was therefore `base' here --- and on the other kernel it was whatever that implementation happened to be in. ⭐ Same openkal calls, two different observable answers, and NEITHER WAS WRONG, because the specification said nothing about it. That is the shape clause 11 entry 13 already records for a different operation: a divergence caused by a missing declaration is a defect of the specification. ⇒ 0.11 gives the caller a second directory and both implementations now enter the one the caller named. The program's name is made absolute first, through the `F_GETPATH' this repository already uses in src/fs.cpp for the same reason --- with no `execveat' one `fchdir' cannot serve both meanings. KAL_SPAWN_OWN_JOB is claimed and implemented (`setpgid' in the duplicate); kal_process_terminate reaches the group when the started program formed one, and recovers that fact with `getpgid(pid) == pid' rather than storing it. KAL_SPAWN_BOUND_LIFETIME stays refused, for the reason 0.10 recorded: this system offers a watch, a watch needs a live context to notice, and a caller killed outright notices nothing.
The identity is established at the first start --- the first member forms the group and its identifier is reported --- so nothing has to be remembered and no registry appears. `kal_process_terminate' is one program again; the unit has its own operations.
…quiet `kal_spawn.job' and `kal_process_job_enter' are both `setpgid' here: the unit's identity is the first member's, reported back to the caller. `job_terminate' uses the signal that cannot be declined --- a unit contains programs the caller never held a handle to, so a request any member may ignore does not terminate it.⚠️ ⚠️ AND A DEFECT IS RECORDED RATHER THAN GUESSED AT. openkal defines no signals, and `kal_stream_write' is required to REPORT that a stream's far end is gone --- while this kernel delivers SIGPIPE, whose default action ends the program. A C library above answers `signal(SIGPIPE, SIG_IGN)' truthfully, having nothing to set, and the program is killed anyway by a mechanism no layer between can name. openkal-linux now ignores it in one call at startup. This kernel's `sigaction' takes a structure carrying a trampoline its C library supplies, and a disposition installed with the wrong shape shows up as a program dying in a way nobody can trace --- which is the defect this note is about, arrived at from the other side. So it waits until it can be MEASURED here, and the consequence is stated in the file rather than discovered by whoever meets it.
…y gives Observing a request to end means installing a disposition, and this kernel's `sigaction' takes a structure carrying a trampoline its C library supplies. A disposition installed with the wrong shape shows up as a program dying in a way nobody can trace --- which is the defect the sibling note is about, met from the other side. Not claimed, so a caller that asks first is told.
⚠️ ⚠️ A REGEX SUBSTITUTION ACROSS A WHOLE FILE DELETED A FUNCTION I NEVER MEANT TO TOUCH, and nothing local noticed: this file still compiled, because a definition that is absent is not a compile error --- it is a link error, and only in a program that calls it. ⭐ What found it was the cross-link job in openkal-musl, three repositories away: ld64.lld: error: undefined symbol: _kal_process_wait ⇒ Restored from the branch point rather than retyped. The test file is updated for the 0.11 spawn record at the same time. The lesson is recorded rather than resolved: a multi-line pattern applied to a whole file can remove more than it matches, and the only thing that reports it is something that LINKS. This repository builds a library and does not link a program, so its own build could never have caught this.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The identity is established at the first start --- the first member forms the group and its identifier is reported --- so
nothing has to be remembered and no registry appears. `kal_process_terminate'
is one program again; the unit has its own operations.