mirror of
https://github.com/pithings/unkernel.git
synced 2026-12-05 22:49:54 +08:00
exec() and spawn() reject with PtyError EREMOTE and only the guest's
message when a program cannot start, so a caller that must map this to a
shell exit status or tell a missing program from a missing directory has to
parse the text. PtyError now has stage ("exec", "chdir" or "user") and
guestCode (the errno name, e.g. "ENOENT", "EACCES", "ENOTDIR"),
derived on the host from kwtty's fixed message formats, with the strerror
texts of musl and glibc. No protocol change: it works with every existing
image and snapshot. A message that does not match, or an unknown errno
text, leaves the fields undefined; code and message are unchanged.
Co-authored-by: Pooya Parsa <pooya@pi0.io>