Skip to content

0.7.3: okrun's command line is a function of the runner, so a program built over it names itself the loader (#46) - #48

Merged
Sunrisepeak merged 1 commit into
mainfrom
fix/the-runner-names-its-loader
Nov 22, 2026
Merged

Sunrisepeak merged 1 commit into
mainfrom
fix/the-runner-names-its-loader

Conversation

@Sunrisepeak

Copy link
Copy Markdown
Member

Fixes #46.

Cause

An image file that an image starts is entered through the loader the runner names (okrun_options::loader, 0.7.1). The program okrun names itself (kal_env_image). openkal-platform's carrier (carrier/main.cpp), which mcpp packs as a row's runner where no okrun package serves the machine, calls okrun_run_file with default options and names no loader. On i686-openkal the runner is that carrier, so start_program returned kal_err_not_program. posix_spawn then gave ENOEXEC, and a copy that called exec ended with 127. x86_64 runs the okrun program and was not affected.

Measured on Linux x86_64 with mcpp 2026.11.22.1 and openkal-platform 0.31.2, using an i386 image that posix_spawns itself:

Runner Result
the carrier spawn rc=8
okrun built for i686-linux-musl from this branch child=3

Change

  • okrun_main(argc, argv) (include/okrun.h, run/src/command.cpp) is okrun's command line, moved from tools/src/okrun.cpp:
    • the options --require-signature, --trust, --debugger, --prof, --argv0;
    • the cache subcommand;
    • the loader, which is the calling program itself.
  • The program okrun is now main calling it. A platform's carrier calls it as its package's runner; that is the openkal-platform change that follows this release.
  • openkal-ld, openkal-run, openkal-tools and openkal-bind are 0.7.3.

Tests

  • New CI job run (linux-i686 on linux-x86_64):
    • builds okld for the machine and okrun for i686-linux-musl over openkal-platform 0.31.2;
    • builds examples/starts and examples/exits for i686;
    • expects starts: itself 7 and starts: ok. The image starts itself, then exits.oke, then /bin/sh -c "exit 5".
  • Measured locally with the same steps: starts: itself 7, starts: exits.oke 0, starts: /bin/sh 5, starts: ok.

@Sunrisepeak
Sunrisepeak merged commit ef3666f into main Nov 22, 2026
7 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.

okrun 0.7.2 for linux-i686: an image an i386 image starts ends with status 127 before it is entered (x86_64 enters it)

1 participant