Open

Description
The results of read
[1] and write
[2] system calls are implementation-defined if the count
parameter is larger than value of SSIZE_MAX
constant defined in limits.h
according to POSIX.1 standard.
So in order to make it possible to use read
and write
in a portable manner, SSIZE_MAX
should be exposed on POSIX.1-conformant systems.
[1] https://pubs.opengroup.org/onlinepubs/9699919799/functions/read.html
[2] https://pubs.opengroup.org/onlinepubs/9699919799/functions/write.html
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
[-]Expose SSIZE_MAX to enable safe read system calls[/-][+]Expose SSIZE_MAX to enable safe read and write system calls[/+][-]Expose SSIZE_MAX to enable safe read and write system calls[/-][+]Expose SSIZE_MAX to enable safe/portable read and write system calls[/+]maxbla commentedon Oct 17, 2020
I realize this issue is rather old, but is there any platform where SSIZE_MAX is not equal to
libc::ssize::max_value()
?