0.12.0 --- the working directory reaches the program, and a unit can be asked for - #26
Merged
Conversation
…be asked for Two of the three things a consumer's own tests were red on are now green, and both were measured against their tree rather than against a probe of mine. ⭐ `chdir' NOW REACHES A STARTED PROGRAM. openkal 0.11 carries a second directory per start, so `okm_cwd_dir' --- which is what `chdir' has always moved, this library having no other place to move --- is passed as the one the program runs in. That closes the `fork' route too: a copy that chdir'd has its own `okm_cwd_dir', and the `execve' it then performs reaches the same line. `POSIX_SPAWN_SETPGROUP' is honoured, in the one form this port can mean: a zero group asks for a unit of the program's own, which openkal 0.11's `kal_spawn.job' says exactly. A NAMED group is still refused rather than quietly turned into a different one --- openkal cannot put a program into somebody else's unit.⚠️ WHAT IS STILL RED, AND IT IS ONE ASSERTION. The consumer forms its group with `fork'; `setpgid(0, 0)'; `execvp' and then kills by number from the parent. The unit that start forms belongs to the STARTED program, whose identifier is not the copy's --- so the parent's `kill(-pid)' names a group that is not the one that exists. Closing it needs an operation that puts THE CALLING program into a unit, which openkal does not have and which is the obvious next declaration. Recorded rather than approximated. Measured on the consumer's tree, both architectures: `cwd: 子进程 chdir 生效' and `EOF 早到: 进程未残留' green, `超时: 后台后代随组死' still red; agent-core 42/9 to 43/8, with `test_chat_tools' bash-cwd now green.
Three calls a shell runner makes, each of which used to succeed and change nothing a caller could observe --- which is the failure shape this port names in okm_opt.h and had three more instances of. `setpgid(0, 0)' answered 0 and formed nothing. True in a world with no groups, so it was not a lie; it was also not a unit, and the caller's next act --- `kill(-pid)' --- found nothing to kill. It is now `kal_process_job_enter'. `kill(-n)' answered ESRCH while a unit existed. It now names the unit: the one this program formed, or the one a start formed for a child.⚠️ THE UNIT IS KEPT PAST THE WAIT, and that is the case a unit is used FOR --- a shell exits at once and the work it backgrounded is what a timeout has to reach. Clearing it on the wait made this answer ESRCH a fraction of a second before every caller that wants it; measured, the background work survived. `posix_spawn_file_actions_addchdir_np' was refused along with everything this file could not express. openkal 0.11 gives a spawn a second directory, so both chdir actions are now answered.⚠️ `POSIX_SPAWN_SETPGROUP' is honoured only in the form this port can mean: a zero group asks for a unit of the program's own, which is exactly `kal_spawn.job'. A NAMED group stays refused --- openkal cannot put a program into somebody else's unit, and turning that request into a different one quietly is the defect above with a fourth instance.⚠️ ⚠️ AND ONE IDIOM REMAINS OUT OF REACH, WHICH IS RECORDED AND NOT APPROXIMATED. `fork(); setpgid(0, 0); exec…' forms a unit led by the program the COPY starts, whose identity the original never learns --- so the original's `kill(-pid)' names a group that is not the one that exists. Closing it needs the copy and its parent to agree on a name before either exists, which nothing here can arrange. `posix_spawn' with the attribute above is the form that works, and it is what the consumer moved to.
⚠️ ⚠️ A replacement leaves ONE image; this composition leaves two, and the one that remains still held every file description the caller had --- including the write end of a pipe it had just placed at the started program's standard output. A pipe reports the end of input when the LAST writer lets go, so the reader on the other side saw a stream that was still open, from a program that had ended. ⭐ Measured through a consumer: an MCP server that exits mid-request should be reported as "Connection closed" and was reported as "Timed out after 1000ms". The server was gone, nobody was writing, and the pipe stayed open because of a waiter neither side knew existed.⚠️ THIS IS THE 0.10 DEFECT'S THIRD FACE. `kal_process_spawn_bound' was added because a SIGNAL reached the middle image; this is the middle image holding a RESOURCE. Same fact, same fix: make that image as invisible as it claims to be.
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.
Two of the three things a consumer's own tests were red on are now green, and
both were measured against their tree rather than against a probe of mine.
⭐
chdir' NOW REACHES A STARTED PROGRAM. openkal 0.11 carries a second directory per start, sookm_cwd_dir' --- which is whatchdir' has always moved, this library having no other place to move --- is passed as the one the program runs in. That closes thefork' route too: a copy that chdir'd has its ownokm_cwd_dir', and theexecve' it then performs reaches the same line.POSIX_SPAWN_SETPGROUP' is honoured, in the one form this port can mean: a zero group asks for a unit of the program's own, which openkal 0.11'skal_spawn.job'says exactly. A NAMED group is still refused rather than quietly turned into a
different one --- openkal cannot put a program into somebody else's unit.
fork';setpgid(0, 0)';execvp' and then kills by number from the parent. The unit that start forms belongs to the STARTED program, whose identifier is not the copy's --- so the parent'skill(-pid)' names a group that is not the one thatexists. Closing it needs an operation that puts THE CALLING program into a unit,
which openkal does not have and which is the obvious next declaration. Recorded
rather than approximated.
Measured on the consumer's tree, both architectures:
cwd: 子进程 chdir 生效' andEOF 早到: 进程未残留' green,超时: 后台后代随组死' still red; agent-core 42/9 to 43/8, withtest_chat_tools' bash-cwd now green.