Hello everyone! I made three little useful utility libraries related to various UNIX APIs:
A thin yet convenient wrapper for using (UNIX domain) sockets for simple synchronous IPC via
recvmsg(), which allows file descriptor passing.
You can easily send byte slices, custom structs (as raw memory), and Serde-serializable values (with CBOR, JSON or Bincode).
Creates anonymous shared memory file descriptors.
memfd on Linux,
SHM_ANON on FreeBSD,
fork() wrapper that uses process descriptors (
pdfork()) on FreeBSD and normal fork elsewhere.
Process descriptors are immune to PID race conditions (they track the exact process in the kernel) and they work in the Capsicum sandbox.