Skip to content

0.15.0 --- the atoms of openkal 0.17, the stop word given back, and SIGPIPE no longer fatal - #30

Merged
Sunrisepeak merged 7 commits into
mainfrom
openkal-0.17.0
Oct 26, 2026
Merged

Sunrisepeak merged 7 commits into
mainfrom
openkal-0.17.0

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Implements openkal 0.17 (mcpplibs/openkal#52, branch openkal-0.17.0) and fixes two defects.

openkal 0.17

  • kal_fs_rename_flags: renameatx_np(RENAME_EXCL) on APFS and HFS+.
  • kal_env_image: proc_info(PROC_PIDPATHINFO), falling back to executable_path=. kal_env_system: macos.
  • kal_net_listen_at / kal_net_connect_at: this kernel has no bindat/connectat. The name is bound relative to the directory through the thread's own working directory (__pthread_fchdir), entered and left around the call, so no other thread's relative names change meaning in between.
  • kal_process_end_as_requested.
  • kal_process_self, kal_process_open_id, kal_process_info. There is no descriptor for a process here, so an opened handle carries 24 bits of the program's start time. ended is reported once the identifier names a program that started at a different time.
  • KAL_TERM_SEQUENCES is reported as set.
  • kal_exec_publish_part and kal_exec_granularity.
  • An environment entry without = is refused.

Defects

  • K2. A request that the starter ignored stays ignored when the stop word is armed.
  • K8. SIGPIPE is ignored when nothing else has set a disposition for it. Ignoring needs no trampoline, and the sigaction structure is the one the stop word already measured. A write to a closed stream is now reported to the program instead of ending it.

Not changed: the x86_64 stop word (K6) remains unclaimed until mcpp publishes a macOS x86_64 build that can run it in CI (open question O5).

Tests: tests/stop_word_and_sigpipe.cpp, tests/stop_word_ignored.cpp. The sources cross-compile locally for aarch64-macos with llvm 23.1.3; this repository's macOS CI runs them.

Sunrisepeak and others added 7 commits October 26, 2026 19:17
…IGPIPE no longer fatal

openkal 0.17 (branch openkal-0.17.0):
- kal_fs_rename_flags (renameatx_np RENAME_EXCL) on APFS and HFS+
- kal_env_image (proc_info PROC_PIDPATHINFO, then executable_path=), kal_env_system
- kal_net_listen_at / kal_net_connect_at: AF_UNIX bound relative to the directory
  through the thread's own working directory (__pthread_fchdir); no bindat here
- kal_process_end_as_requested; kal_process_self, kal_process_open_id, kal_process_info
  (proc_bsdinfo start time, rusage processor time in the kernel's timebase)
- KAL_TERM_SEQUENCES reported set
- kal_exec_publish_part, kal_exec_granularity
- an environment entry without = is refused

Defects:
- K2: a request the starter ignored stays ignored when the word is armed
- K8: SIGPIPE ignored where nothing else chose a disposition; a write to a
  closed stream is reported (the sigaction shape is the one the stop word measured)

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
sigreturn is validated against a per-thread token the kernel hands the
trampoline in x5, once anything installs a disposition through the C library.
The trampoline passed nothing, and a program that had called signal() before
arming the stop word died with SIGTRAP on its first request.

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…rted program begins with the default again where the ignore was made here

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…rness was started with

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…name (openkal 0.17)

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
…OP_REMOVE_OPEN (openkal 0.17, clause 7.14)

Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
Co-authored-by: speak-agent <248744407+speak-agent@users.noreply.github.com>
@Sunrisepeak
Sunrisepeak merged commit bb0a34c into main Oct 26, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant