···11# pid1
2233-Minimal OCaml PID 1 for SpaceOS VMs.
33+Minimal OCaml PID 1 for Linux VMs.
4455-Minimal init process for SpaceOS virtual machines running in LinuxKit-style VMs
66-with no shell or busybox. Mounts essential filesystems (devtmpfs, proc, sysfs),
77-handles signals for zombie reaping and graceful shutdown, reads the SpaceOS
88-superblock from virtio-blk devices, and provides a service supervisor state
99-machine with exponential backoff.
55+Minimal init process for LinuxKit-style VMs with no shell or busybox. Mounts
66+essential filesystems (devtmpfs, proc, sysfs), handles signals for zombie
77+reaping and graceful shutdown, reads the superblock from virtio-blk devices,
88+and provides a service supervisor state machine with exponential backoff.
1091110The library uses C stubs for `mount(2)` and `reboot(2)` syscalls which have no
1211Eio equivalent. The companion `spaceos-init` binary is the actual init process:
···4342- **Signal handling** -- `setup_signals` installs SIGCHLD (zombie reaping),
4443 SIGTERM, and SIGINT handlers. `shutdown_requested` reports whether a
4544 termination signal was received.
4646-- **Superblock** -- `read_superblock` reads a 48-byte SpaceOS superblock from a
4747- block device. `check_magic` validates the magic number (0x53504F53 / "SPOS").
4545+- **Superblock** -- `read_superblock` reads a 48-byte superblock from a block
4646+ device. `check_magic` validates the magic number (0x53504F53 / "SPOS").
4847 `check_crc` validates the CRC-32C. A Wire codec is provided for
4948 encoding/decoding.
5049- **System control** -- `poweroff` and `halt` invoke `reboot(2)`.