stdio sucks but also not having a way to read from an fd into a fixed size buffer in a way that is guaranteed to not be interrupted sucks (short reads for EOF is obv fine, EINTR that eats me)
i could write my own thing for that or use a library ig but don't want to, it should be there
wait wait wait -- i went to read the signal manpage and posix docs again, and if i got it right, if signals handlers are not installed (so, default behaviour or ignored), or installed with SA_RESTART, most syscalls will not be interrupted with EINTR (including read)
so if i just, install handlers with SA_RESTART, i don't have to deal with looping short-reads/EINTR at all -- and only if i'm writing a library i'd have to choose between propagating an EINTR, or not and either loop-read or mask signals temporarily
and lastly if i have an event loop, i can also mask all signals and unmask what i need only during ppoll() (though unsure why i'd do this over just installing handlers with SA_RESTART)
RE: https://social.vlhl.dev/objects/c59887aa-8b55-4c6d-bd92-b51fde5e7252