V Mon, Jul 19, 2021 at 03:39:53PM -0500, Paul Eggert napsal(a): > On 7/19/21 7:54 AM, Christian Schoenebeck wrote: > > POSIX compliant applications must always expect that read() / > > write() functions might read/write less bytes than requested > > Although that's true in general, it's not true for regular files. The > POSIX spec for 'read' > <https://pubs.opengroup.org/onlinepubs/9699919799/functions/pread.html> > says, "The value returned may be less than /nbyte/ if the number of > bytes left in the file is less than /nbyte/, if the /read/() request was > interrupted by a signal, or if the file is a pipe or FIFO or special > file and has fewer than /nbyte/ bytes immediately available for reading." > > So, regular files shouldn't get short reads unless there's an EOF or a > signal. > What does gaurantee there is no signal sent to the process?
-- Petr
signature.asc
Description: PGP signature