From 0a4bce47865e7c00be5cb3145575d46fad7284c8 Mon Sep 17 00:00:00 2001 From: Sunrisepeak Date: Thu, 19 Nov 2026 12:23:17 +0900 Subject: [PATCH] 0.2.0: the system's refusal of a start for its size is kal_err_no_space (openkal 0.26) - E2BIG from the exec family is kal_err_no_space, where it was kal_err_io (clause 7.6); no bound of this implementation's own existed upon an argument vector or an environment - observable units remain unclaimed and kal_process_job_create answers kal_err_not_supported (clause 7.18) - openkal ^0.26.0 --- README.md | 21 ++++++++++++++++++++- mcpp.toml | 4 ++-- src/posix.cpp | 3 +++ 3 files changed, 25 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index c564d50..90abd02 100644 --- a/README.md +++ b/README.md @@ -5,9 +5,28 @@ a POSIX C library. ```toml [dependencies] -openkal-posix = "0.1.1" +openkal-posix = "0.2.0" ``` +## What 0.2 changes (openkal 0.26) + +**A start is bounded by the system alone** (clause 7.6). This implementation kept +no bound of its own: both vectors of a start are allocated at their measured +size, and a started program reads the vectors the C library gave it. What +changes is the report of the system's refusal. A start whose arguments and +environment exceed what the system admits is answered `E2BIG` by the `exec` +family, and that is now `kal_err_no_space`, where it was `kal_err_io`. Measured +on Linux x86_64 (glibc) with the specification's suite: 2,000 arguments and +2,000 variables reach the started copy, and an argument of 1 MiB is refused +with `kal_err_no_space`; before the change that observation did not hold. + +**Observable units are not claimed, as before** (clause 7.18). +`kal_process_props` does not state `KAL_PROCESS_PROP_JOB_OBSERVE`, and +`kal_process_job_create` answers `kal_err_not_supported`; openkal 0.26 requires +the two to agree, and they did. + +The manifest declares `openkal = "^0.26.0"`. + ## What 0.1.1 corrects The manifest declares `openkal = "^0.25.0"`. An implementation written against a diff --git a/mcpp.toml b/mcpp.toml index a9e3110..dce48d5 100644 --- a/mcpp.toml +++ b/mcpp.toml @@ -1,7 +1,7 @@ [package] namespace = "mcpplibs" name = "openkal-posix" -version = "0.1.1" +version = "0.2.0" description = "An implementation of openkal written above a POSIX C library: the system's own C library beneath, openkal's interfaces above, for the systems that have no implementation of their own." license = "Apache-2.0" authors = ["mcpplibs"] @@ -51,7 +51,7 @@ provides-interfaces = [ [dependencies] # Every patch release of the specification's minor version (openkal clause 8). -openkal = "^0.25.0" +openkal = "^0.26.0" [build] sources = ["src/*.cpp"] diff --git a/src/posix.cpp b/src/posix.cpp index 75d03bd..eeca7c3 100644 --- a/src/posix.cpp +++ b/src/posix.cpp @@ -66,6 +66,9 @@ int translate(int e) { case ENOMEM: return kal_err_no_memory; case ENOSPC: return kal_err_no_space; case EDQUOT: return kal_err_no_space; + // A start whose arguments and environment exceed what the system admits + // (ARG_MAX, and on Linux 128 KiB for one string): openkal 0.26, clause 7.6. + case E2BIG: return kal_err_no_space; case EACCES: case EPERM: case EROFS: return kal_err_permission;