From 283681d0761f7f4f8618a82cf2f90366a733444b Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Thu, 19 Nov 2026 11:51:27 +0900 Subject: [PATCH] 0.27.0: a start bounded by the kernel alone; a unit's reference names its process space exactly (openkal 0.26) - the bound of 512 entries upon an argument vector and an environment is removed; E2BIG is kal_err_no_space, where it was kal_err_io (clause 7.6) - the unit reference (L3) adds the start of the space's first program: the kernel gives a namespace's number to a later namespace; a reference of another boot and one whose number another program now holds are EMPTY; another space, and the L2 form, are kal_err_not_supported from open - KAL_PROCESS_PROP_JOB_OBSERVE is claimed only where a reference can be made - openkal ^0.26.0 --- README.md | 28 ++++- mcpp.toml | 4 +- src/process.cpp | 98 ++++++++++++---- src/sys.h | 7 +- ...a_start_is_bounded_by_the_kernel_alone.cpp | 88 +++++++++++++++ ...nit_reference_names_its_boot_and_space.cpp | 105 ++++++++++++++++++ 6 files changed, 301 insertions(+), 29 deletions(-) create mode 100644 tests/a_start_is_bounded_by_the_kernel_alone.cpp create mode 100644 tests/a_unit_reference_names_its_boot_and_space.cpp diff --git a/README.md b/README.md index 846a2e5..c75e7cd 100644 --- a/README.md +++ b/README.md @@ -5,12 +5,36 @@ for Linux, written on the kernel's own system-call interface. ```toml [dependencies] -openkal = "0.25.0" +openkal = "0.26.0" [target.'cfg(os = "linux")'.dependencies] -openkal-linux = "0.26.3" +openkal-linux = "0.27.0" ``` +## What 0.27 changes (openkal 0.26) + +**A start is bounded by the kernel alone** (clause 7.6). An argument vector or an +environment of more than 512 entries was refused and reported as +`kal_err_no_memory`; the constant guarded no buffer, since both vectors are +allocated at their measured size. It is removed: the kernel bounds bytes, a quarter +of the stack limit in all and 128 KiB for one string, and its refusal (`E2BIG`) is +reported as `kal_err_no_space`, where it was `kal_err_io`. +`tests/a_start_is_bounded_by_the_kernel_alone.cpp` starts a shell with 2,000 +arguments, with 2,000 variables, and with a string of 200 KiB. + +**A unit's reference names its process space exactly** (clause 7.18). A reference +held the text of `/proc/self/ns/pid`, and the kernel gives the number of a +namespace that has ended to a later one (measured: four namespaces made one after +another bore one number), so a reference from one was answered in the next from a +process group that had nothing to do with it. The reference (`L3`) adds the start +of the space's first program. A reference of another boot is `empty`, and so is +one whose number a program of another start now holds: a number is given again +only once no program holds it as its group. A reference of another space of this +boot is refused by `kal_process_job_open` with `kal_err_not_supported`, as is one +in the earlier form (`L2`), which does not say which space it was made in. +`KAL_PROCESS_PROP_JOB_OBSERVE` is claimed only where the boot's name, the space +and the caller's start can be read. `tests/a_unit_reference_names_its_boot_and_space.cpp`. + ## What 0.26.3 corrects **The processor time on i386.** The program's processor time and the monotonic diff --git a/mcpp.toml b/mcpp.toml index 784901e..33795fe 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -1,7 +1,7 @@ [package] namespace = "mcpplibs" name = "openkal-linux" -version = "0.26.3" +version = "0.27.0" description = "The reference implementation of openkal for Linux, written on the kernel's own system-call interface so that it can be placed beneath a C library as well as above one." license = "Apache-2.0" @@ -68,7 +68,7 @@ provides-interfaces = [ [dependencies] # Every patch release of the specification's minor version (openkal clause 8). -openkal = "^0.25.0" +openkal = "^0.26.0" # The package contributes definitions and no modules. The interface it # implements is declared by the specification package, which this package diff --git a/src/process.cpp b/src/process.cpp index eb8ef95..65cca18 100644 --- a/src/process.cpp +++ b/src/process.cpp @@ -30,8 +30,6 @@ bool same_prefix(const char* a, const char* b, okl_uptr n) { // peak, and in `rest' the counts that follow, the page faults at 3 and 4. struct k_rusage { okl_long utime_s, utime_us, stime_s, stime_us, maxrss; okl_long rest[13]; }; -constexpr okl_uptr kMaxEntries = 512; - constexpr char kPreopens[] = "KAL_PREOPENS="; constexpr okl_uptr kPreopensLen = sizeof kPreopens - 1; constexpr okl_uptr kPidDigits = 10; @@ -137,7 +135,6 @@ struct vector { bool ok = true; bool build(const char** items, const kal_uintptr* lens, kal_uintptr n) { - if (n > kMaxEntries) { ok = false; return false; } okl_uptr total = 0; for (kal_uintptr i = 0; i < n; ++i) total += lens[i] + 1; slots_bytes = (n + 1) * sizeof(char*); @@ -181,7 +178,6 @@ struct vector { bool build_env(const char** items, const kal_uintptr* lens, kal_uintptr n, const kal_preopen* grants, kal_uintptr g, const conveyance& c) { - if (n > kMaxEntries) { ok = false; return false; } auto left_out = [&](const char* s, kal_uintptr l) { return names_preopens(s, l) || starts_with(s, l, kRights, kRightsLen) || starts_with(s, l, kResources, kResourcesLen); @@ -382,6 +378,8 @@ inline void reap(okl_long child) { } // namespace +namespace { bool units_observable(); } // defined beside the unit's reference + extern "C" { // Starting a program. ONE FUNCTION SINCE 0.11, AND THE SAVING IS NOT ONLY IN @@ -1665,8 +1663,12 @@ int kal_process_end_as_requested(void) { for (;;) { } } +// Observation is claimed where a reference can be made (clause 7.18): an +// environment that hides the boot's name or the space's first program states no +// origin, so a unit declared there could not be told from another's. kal_uintptr kal_process_props(void) { - return KAL_PROCESS_PROP_JOB_OBSERVE | KAL_PROCESS_PROP_TERMINATE | KAL_PROCESS_PROP_STREAM_PASSING + return (units_observable() ? KAL_PROCESS_PROP_JOB_OBSERVE : 0u) + | KAL_PROCESS_PROP_TERMINATE | KAL_PROCESS_PROP_STREAM_PASSING | KAL_PROCESS_PROP_EXIT_STATUS | KAL_PROCESS_PROP_CHANNEL | KAL_PROCESS_PROP_GRANT_DIR | KAL_PROCESS_PROP_BOUND_LIFETIME @@ -2015,14 +2017,37 @@ int kal_process_job_limit(kal_job j, kal_uintptr kind, kal_u64 value) { // Observable units (openkal 0.24). The unit stays the kernel's own group; // identity validation does not create a registry or infer quiet from a leader. +// +// A REFERENCE NAMES ITS PROCESS SPACE EXACTLY (openkal 0.26, clause 7.18). The +// space was the text of /proc/self/ns/pid alone until then, and the kernel +// gives a namespace that has ended its number to a later one --- measured: four +// namespaces made one after another, each named pid:[4026533469]. A reference +// from one was read in the next as this space's, and answered from a process +// group there that had nothing to do with it. The space is now that text and +// the start of the space's first program, which no two spaces of one boot share. +// +// WHAT AN OBSERVATION CAN ESTABLISH, AND WHAT IT CANNOT (clause 7.18): +// another boot every program of it has ended EMPTY +// this space, no group the kernel holds no such group EMPTY +// this space, the number is another program's +// a number is given again only once no program +// holds it as its group, so the unit ended EMPTY +// this space, the group OCCUPIED +// another space of this boot +// its programs cannot be enumerated from here: +// `open' refuses, and that answer does not change #include "unit_reference.h" namespace { struct unit_identity { - kal_u64 group = 0, birth = 0; + kal_u64 group = 0, birth = 0, space_birth = 0; char boot[64]{}, space[64]{}; + bool exact = false; // an L3 reference; an L2 one names its space by number only }; bool unit_birth(okl_long pid, kal_u64& value) { okl_u64 ticks = 0; if (!started_ticks(pid,ticks)) return false; value = ticks; return true; } -bool unit_origin(char* boot, char* space) { +// The boot, the space and the start of the space's first program, or nothing +// where one of them cannot be read: a reference is then not made, and the +// property is not claimed (kal_process_props). +bool unit_origin(char* boot, char* space, kal_u64& space_birth) { if (self_number() != okl::sys(okl::nr_getpid)) return false; const auto fd = okl::openat( okl::at_fdcwd, reinterpret_cast("/proc/sys/kernel/random/boot_id"), okl::o_rdonly | okl::o_cloexec, 0); @@ -2035,19 +2060,43 @@ bool unit_origin(char* boot, char* space) { n = okl::sys(okl::nr_readlinkat, okl::at_fdcwd, reinterpret_cast("/proc/self/ns/pid"), reinterpret_cast(space), 63); if (n <= 0 || n >= 63) return false; - space[n] = 0; return true; + space[n] = 0; + return unit_birth(1, space_birth) && space_birth != 0; } bool unit_parse(const char* p, kal_uintptr n, unit_identity& u) { if (!p || n == 0 || n > 256) return false; unit_reference::reader r{p,n}; char kind[8]{}; - return r.token(kind, sizeof kind) && unit_reference::same(kind,"L2") - && r.number(u.group) && u.group > 0 && u.group <= 0x7fffffffu - && r.number(u.birth) && u.birth != 0 - && r.token(u.boot,sizeof u.boot) && r.token(u.space,sizeof u.space) && r.at == n; -} -bool unit_same_origin(const unit_identity& u) { - char boot[64]{}, space[64]{}; - return unit_origin(boot,space) && unit_reference::same(u.boot,boot) && unit_reference::same(u.space,space); + if (!r.token(kind, sizeof kind)) return false; + u.exact = unit_reference::same(kind,"L3"); + if (!u.exact && !unit_reference::same(kind,"L2")) return false; + if (!(r.number(u.group) && u.group > 0 && u.group <= 0x7fffffffu + && r.number(u.birth) && u.birth != 0 + && r.token(u.boot,sizeof u.boot) && r.token(u.space,sizeof u.space))) return false; + if (u.exact && !(r.number(u.space_birth) && u.space_birth != 0)) return false; + return r.at == n; +} +enum class origin { here, another_boot, another_space, unreadable }; +origin unit_origin_of(const unit_identity& u) { + char boot[64]{}, space[64]{}; kal_u64 space_birth = 0; + if (!unit_origin(boot,space,space_birth)) return origin::unreadable; + if (!unit_reference::same(u.boot,boot)) return origin::another_boot; + // An L2 reference does not say which of the spaces that have borne this + // number it was made in, so it is this one's only by assumption. + if (!u.exact || !unit_reference::same(u.space,space) || u.space_birth != space_birth) + return origin::another_space; + return origin::here; +} +// Whether this environment lets a reference be made: read once, since the +// answer is a property of where the program runs. +bool units_observable() { + static int known = -1; + int k = __atomic_load_n(&known, __ATOMIC_ACQUIRE); + if (k < 0) { + char boot[64]{}, space[64]{}; kal_u64 space_birth = 0, own = 0; + k = unit_origin(boot,space,space_birth) && unit_birth(0,own) && own != 0 ? 1 : 0; + __atomic_store_n(&known, k, __ATOMIC_RELEASE); + } + return k == 1; } } extern "C" { @@ -2056,9 +2105,9 @@ int kal_process_job_create(kal_job* out, char* reference, kal_uintptr capacity, if (capacity < 256) return kal_err_no_space; unit_identity u; u.group = static_cast(okl::sys(okl::nr_getpid)); - if (!unit_origin(u.boot,u.space)||!unit_birth(0,u.birth)||!u.birth) return kal_err_not_supported; - unit_reference::writer w; w.text("L2;"); w.number(u.group); w.next(); w.number(u.birth); w.next(); - w.text(u.boot); w.next(); w.text(u.space); + if (!unit_origin(u.boot,u.space,u.space_birth)||!unit_birth(0,u.birth)||!u.birth) return kal_err_not_supported; + unit_reference::writer w; w.text("L3;"); w.number(u.group); w.next(); w.number(u.birth); w.next(); + w.text(u.boot); w.next(); w.text(u.space); w.next(); w.number(u.space_birth); if (!w.valid) return kal_err_no_space; kal_job job{}; const int rc = kal_process_job_enter(&job); if (rc != kal_ok) return rc; @@ -2067,18 +2116,21 @@ int kal_process_job_create(kal_job* out, char* reference, kal_uintptr capacity, int kal_process_job_open(const char* reference, kal_uintptr length, kal_job* out) { if (!out) return kal_err_invalid; unit_identity u; if (!unit_parse(reference,length,u)) return kal_err_invalid; - if (!unit_same_origin(u)) return kal_err_not_supported; + const origin o = unit_origin_of(u); + if (o == origin::another_space || o == origin::unreadable) return kal_err_not_supported; out->h = static_cast(u.group); return kal_ok; } int kal_process_job_observe(kal_job job, const char* reference, kal_uintptr length, kal_u32* state) { if (!state) return kal_err_invalid; *state = KAL_JOB_UNKNOWN; unit_identity u; if (!unit_parse(reference,length,u) || job.h != u.group) return kal_err_invalid; - if (!unit_same_origin(u)) return kal_ok; + const origin o = unit_origin_of(u); + if (o == origin::another_boot) { *state = KAL_JOB_EMPTY; return kal_ok; } + if (o != origin::here) return kal_ok; const auto status = okl::sys(okl::nr_kill,-static_cast(u.group),0); if (status == -3 /* ESRCH */) { *state = KAL_JOB_EMPTY; return kal_ok; } if (okl::failed(status)) return kal_ok; okl_u64 birth = 0; - if (started_ticks(static_cast(u.group),birth) && birth != u.birth) return kal_ok; + if (started_ticks(static_cast(u.group),birth) && birth != u.birth) { *state = KAL_JOB_EMPTY; return kal_ok; } *state = KAL_JOB_OCCUPIED; return kal_ok; } int kal_process_job_retire(kal_job job, const char* reference, kal_uintptr length, @@ -2086,7 +2138,7 @@ int kal_process_job_retire(kal_job job, const char* reference, kal_uintptr lengt if (!state) return kal_err_invalid; *state = KAL_JOB_UNKNOWN; unit_identity u; if (!unit_parse(reference,length,u) || job.h != u.group) return kal_err_invalid; okl_u64 birth = 0; - if (static_cast(okl::sys(okl::nr_getpid)) != u.group || !unit_same_origin(u) + if (static_cast(okl::sys(okl::nr_getpid)) != u.group || unit_origin_of(u) != origin::here || !started_ticks(0,birth) || birth != u.birth) return kal_err_permission; if (!continuation || !continuation->id || continuation->id > 0x7fffffffu || !continuation->started_ns) return kal_ok; diff --git a/src/sys.h b/src/sys.h index 412723a..320baf6 100644 --- a/src/sys.h +++ b/src/sys.h @@ -352,7 +352,7 @@ enum : okl_long { // appear here rather than being taken from a header: the header belongs to a // C library and this implementation has none. enum : int { - e_perm = 1, e_noent = 2, e_intr = 4, e_io = 5, e_noexec = 8, e_badf = 9, + e_perm = 1, e_noent = 2, e_intr = 4, e_io = 5, e_2big = 7, e_noexec = 8, e_badf = 9, e_child = 10, e_again = 11, e_nomem = 12, e_acces = 13, e_fault = 14, e_busy = 16, e_exist = 17, e_xdev = 18, e_nodev = 19, e_notdir = 20, e_isdir = 21, @@ -458,7 +458,10 @@ inline int translate(okl_long r) { case e_loop: case e_spipe: return 1; // kal_err_invalid case e_again: return 2; // kal_err_again case e_nomem: return 4; // kal_err_no_memory - case e_nospc: case e_fbig: case e_dquot: return 5; // kal_err_no_space + // A start the kernel refuses for the size of its vectors (E2BIG) is a + // request that does not fit, as a write that does not fit is: clause 7.6. + case e_nospc: case e_fbig: case e_dquot: + case e_2big: return 5; // kal_err_no_space case e_acces: case e_perm: case e_rofs: return 6; // kal_err_permission case e_nosys: return 7; // kal_err_not_supported case e_pipe: case e_connreset: return 8; // kal_err_closed diff --git a/tests/a_start_is_bounded_by_the_kernel_alone.cpp b/tests/a_start_is_bounded_by_the_kernel_alone.cpp new file mode 100644 index 0000000..2a66df3 --- /dev/null +++ b/tests/a_start_is_bounded_by_the_kernel_alone.cpp @@ -0,0 +1,88 @@ +// A start takes the vectors its caller gives (SPEC.md clause 7.6, version 0.26). +// +// Until 0.27.0 this implementation refused an argument vector or an environment +// of more than 512 entries and reported it as memory exhausted. Neither vector +// has a fixed buffer, and the kernel bounds bytes, not entries: a quarter of +// the stack limit in all, 128 KiB for one string. A build tool reached the +// bound with a compile command of 520 definitions, and an IDE's build phase +// with 546 variables; both read as a machine out of memory. +// +// Each case has a shell report what it received, since the claim is about the +// started program. +#include +#include +#include +#include +import openkal.fs; +import openkal.types; +import openkal.process; +import mcpplibs.mtest; + +using namespace mcpplibs::mtest; + +namespace { + +kal_dir root() { + for (kal_uintptr i = 0; i < kal_fs_preopen_count(); ++i) { + kal_dir d{}; char n[8]; kal_uintptr l = 0; + if (kal_fs_preopen(i, &d, n, sizeof n, &l) == kal_ok && l == 1 && n[0] == '/') return d; + } + return kal_dir{}; +} + +// Starts /bin/sh with the vectors given; the answer of the start, and the +// status where it started. +int start_shell(const std::vector& args, const std::vector& env, int& status) { + std::vector argv, envp; + std::vector alens, elens; + for (auto const& a : args) { argv.push_back(a.c_str()); alens.push_back(a.size()); } + for (auto const& e : env) { envp.push_back(e.c_str()); elens.push_back(e.size()); } + const kal_spawn how{ root(), kal::fs::working(), nullptr, nullptr, 0, 0 }; + kal_process p{}; + int rc = kal_err_invalid; + for (const char* path : { "bin/sh", "usr/bin/sh" }) { + rc = kal_process_spawn(&how, path, std::strlen(path), argv.data(), alens.data(), argv.size(), + envp.data(), elens.data(), envp.size(), nullptr, &p); + if (rc != kal_err_not_found) break; + } + if (rc != kal_ok) return rc; + int terminated = -1; + kal_process_wait(p, &status, &terminated); + kal_process_close(p); + if (terminated != 0) status = -1; + return kal_ok; +} + +} // namespace + +UTest a_start_is_bounded_by_the_kernel_alone_test{"a_start_is_bounded_by_the_kernel_alone", [] { + // 2,000 arguments after the script: the shell counts them. 2000 mod 256 is 208. + { + std::vector args{ "sh", "-c", "exit $(($# % 256))", "sh" }; + for (int i = 0; i < 2000; ++i) args.push_back("a"); + int status = -1; + const int rc = start_shell(args, {}, status); + expect(rc == kal_ok) << "a vector of 2,004 elements starts (answer " << rc << ")"; + expect(status == 208) << "the started program counts 2,000 arguments (status " << status << ")"; + } + // 2,000 variables, about 200 KiB: the shell reads the first and the last. + { + std::vector env; + const std::string value(90, 'v'); + for (int i = 0; i < 2000; ++i) env.push_back("OKV" + std::to_string(i) + "=" + value + std::to_string(i)); + const std::vector args{ "sh", "-c", + "[ \"${OKV0%0}\" = \"" + value + "\" ] && [ \"${OKV1999%1999}\" = \"" + value + "\" ] && exit 77; exit 1" }; + int status = -1; + const int rc = start_shell(args, env, status); + expect(rc == kal_ok) << "an environment of 2,000 variables starts (answer " << rc << ")"; + expect(status == 77) << "the started program reads the first and the last variable (status " << status << ")"; + } + // One string beyond what the kernel takes for a string (128 KiB): the + // request does not fit, which is not a machine without memory. + { + const std::vector args{ "sh", "-c", "exit 0", "sh", std::string(200 * 1024, 'x') }; + int status = -1; + const int rc = start_shell(args, {}, status); + expect(rc == kal_err_no_space) << "a start the kernel refuses for its size is no space (answer " << rc << ")"; + } +}}; diff --git a/tests/a_unit_reference_names_its_boot_and_space.cpp b/tests/a_unit_reference_names_its_boot_and_space.cpp new file mode 100644 index 0000000..f7bfdae --- /dev/null +++ b/tests/a_unit_reference_names_its_boot_and_space.cpp @@ -0,0 +1,105 @@ +// What an observation of a unit answers (SPEC.md clause 7.18, version 0.26). +// +// A unit here is a process group, and its reference names where it was made: +// the boot, the process space and the start of that space's first program. +// The space was its number alone until 0.27.0, and the kernel gives a later +// space the number of one that ended; a reference was then answered from a +// group of the wrong space. The cases alter a real reference one field at a +// time, which is how a reference from elsewhere reads to this program. +#include +#include +#include +#include +#include +#include +#include +import openkal.types; +import openkal.process; +import mcpplibs.mtest; + +using namespace mcpplibs::mtest; + +namespace { + +std::vector fields(const std::string& r) { + std::vector out(1); + for (char c : r) { if (c == ';') out.emplace_back(); else out.back() += c; } + return out; +} +std::string joined(const std::vector& f) { + std::string out; + for (std::size_t i = 0; i < f.size(); ++i) { if (i) out += ';'; out += f[i]; } + return out; +} + +// What `open' answers, and the state an observation gives where it opens. +struct answer { int open = 0; kal_u32 state = kal::process::job_state::unknown; }; +answer ask(const std::string& reference) { + answer a; kal_job job{}; + a.open = kal_process_job_open(reference.data(), reference.size(), &job); + if (a.open == kal_ok) kal_process_job_observe(job, reference.data(), reference.size(), &a.state); + return a; +} + +} // namespace + +UTest a_unit_reference_names_its_boot_and_space_test{"a_unit_reference_names_its_boot_and_space", [] { + expect(fatal(kal::process::has(kal::process::job_observe))) + << "this environment lets a reference be made, so observation is claimed"; + + // A child declares a unit, reports its reference and stays until told. + int to_parent[2], to_child[2]; + expect(fatal(pipe(to_parent) == 0 && pipe(to_child) == 0)) << "pipes"; + const pid_t child = fork(); + if (child == 0) { + close(to_parent[0]); close(to_child[1]); + kal_job job{}; char reference[256]; kal_uintptr used = 0; + const int rc = kal_process_job_create(&job, reference, sizeof reference, &used); + if (rc != kal_ok) used = 0; + (void)!write(to_parent[1], reference, used); + close(to_parent[1]); + char c; (void)!read(to_child[0], &c, 1); + _exit(0); + } + close(to_parent[1]); close(to_child[0]); + std::string reference(256, '\0'); + const ssize_t n = read(to_parent[0], reference.data(), reference.size()); + reference.resize(n > 0 ? static_cast(n) : 0); + auto f = fields(reference); + expect(fatal(f.size() == 6 && f[0] == "L3")) << "the reference is `L3;group;birth;boot;space;space-birth': " << reference; + + expect(ask(reference).open == kal_ok && ask(reference).state == kal::process::job_state::occupied) + << "a unit with a running member is occupied"; + + { // Another boot: every program of it has ended. + auto g = f; g[3] = "00000000-0000-0000-0000-000000000000"; + const auto a = ask(joined(g)); + expect(a.open == kal_ok && a.state == kal::process::job_state::empty) << "a reference of another boot is empty (open " << a.open << ", state " << a.state << ")"; + } + { // The number is another program's: the kernel gave it again, which it + // does only once no program holds it as its group. + auto g = f; g[2] = std::to_string(std::stoull(f[2]) + 1); + const auto a = ask(joined(g)); + expect(a.open == kal_ok && a.state == kal::process::job_state::empty) << "a unit whose number now names a program of another start is empty (state " << a.state << ")"; + } + { // The same number of a space, another first program: another space. + auto g = f; g[5] = std::to_string(std::stoull(f[5]) + 1); + expect(ask(joined(g)).open == kal_err_not_supported) << "a reference of another space that bears this space's number is not observable"; + } + { // Another space by its number. + auto g = f; g[4] = "pid:[1]"; + expect(ask(joined(g)).open == kal_err_not_supported) << "a reference of another space is not observable"; + } + { // The earlier form does not say which space bore the number. + auto g = f; g[0] = "L2"; g.pop_back(); + expect(ask(joined(g)).open == kal_err_not_supported) << "a reference that names its space by number alone is not observable"; + g[3] = "00000000-0000-0000-0000-000000000000"; + const auto a = ask(joined(g)); + expect(a.open == kal_ok && a.state == kal::process::job_state::empty) << "and one of another boot is empty all the same"; + } + + close(to_child[1]); + int status = 0; waitpid(child, &status, 0); + const auto after = ask(reference); + expect(after.open == kal_ok && after.state == kal::process::job_state::empty) << "a unit whose members have ended is empty (state " << after.state << ")"; +}};