This makes package check portable, and removes nonportable behaviour from package pkg, pipewire, and system. All other packages remain nonportable due to their nature. No latency increase was observed due to this change on amd64 and arm64 linux.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This is done by both systemd sd-device and AOSP ueventd to improve robustness. Rosa OS will still handle ENOBUFS via coldboot but a big buffer should mitigate this as well.
Signed-off-by: Ophestra <cat@gensokyo.uk>
These are generally useful, and none of them are container-specific. Syscalls subtle to use and requiring container-specific setup remains in container.
Signed-off-by: Ophestra <cat@gensokyo.uk>
These are too general to belong in the container package. This targets the v0.4 release to reduce the wrapper maintenance burden.
Signed-off-by: Ophestra <cat@gensokyo.uk>
The more explicit API removes the arbitrary limit preventing use of SCHED_OTHER (referred to as SCHED_NORMAL in the kernel). This change also exposes priority value to set.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This is thread-directed so cannot be done externally. The glibc wrapper exposes this behaviour so most multithreaded programs using this is straight up incorrect.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This compiles GNU make from source. This is unfortunately required by many programs, but is a cure dependency only.
Signed-off-by: Ophestra <cat@gensokyo.uk>
The struct turned out not necessary during initial implementation but was not unwrapped into its single string field. This change replaces it with the underlying string and removes the indirection.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Due to the special nature of the init process, direct use of wait outside the wait4 loop is racy. This change copies the wstatus from wait4 loop state instead.
Signed-off-by: Ophestra <cat@gensokyo.uk>
Due to the special nature of the init process, regular wait calls are unavailable. This change provides infrastructure to access wait4 loop state from Op.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This is at a point considered to be already "within" the container. Daemons internal to the container can be started here.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This significantly increases readability. This patch is pretty big so it is being done after mostly everything has settled.
Signed-off-by: Ophestra <cat@gensokyo.uk>
This is mounted for the default read-only /dev/ when programs want to use shm_open(3). Defining it here is less error-prone and saves the extra append at runtime.
Signed-off-by: Ophestra <cat@gensokyo.uk>
While fd created from this side always has the FD_CLOEXEC flag, the same is not true for files left open by the parent. This change prevents those files from leaking into the container.
Signed-off-by: Ophestra <cat@gensokyo.uk>