According to POSIX.1, using longjmp() to terminate execution of
a function registered using atexit() produces undefined results.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
According to POSIX.1, using longjmp() to terminate execution of
a function registered using atexit() produces undefined results.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
It's a subtle point, but if a registered function itself
calls exit(3), then subsequent functions that were registered
with on_exit(3) will see the exit status given to the more
recent exit(3) call.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
When a 32-bit app opens a file whose size is too big to be
represented in 31-bits, POSIX.1 specifies the error EOVERFLOW.
Linux used to give EFBIG for this case, but 2.6.24 fixed this.
Also, add some text to describe the error scenario in
more detail.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Some errors were listed under a separate "may" heading.
There's probably no real need to do this; integrate
those errors into the main list.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Most other sockets pages are using the names 'addr'
and 'addrlen'; make these pages do the same.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
If the recvfrom() returned address is truncated, the 'fromlen'
argument indicates the actual size of the address, rather than
a count of the number of bytes in the truncated buffer.
Also clarify that the 'from' argument can be NULL, in which
case 'fromlen' should is unused, and should also be NULL.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
If the returned address is truncated, the 'addrlen' argument
indicates the actual size of the address, rather than a count
of the number of bytes in the truncated buffer.
Also clarify that if 'addr' argument is NULL, then 'addrlen'
should is unused, and should also be NULL.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Many sockets man pages use the name 'sockfd' already.
For consistency, changes the others to do so as well.
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
The correct range for the return value is [-pi/2,pi/2].
(mtk's fix in the last change to the return value text was
a botch-up of a (correct) suggestion by Nicolas Francois.)
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Mel Gorman reported that in Linux 2.6.27, 'addr' is rounded
down to a page boundary.
Before kernel 2.6.26, if 'addr' was taken as a hint, it was
rounded up to the next page boundary. Since Linux 2.6.24,
it is rounded down. Therefore, loosen the description of
this point to say that the address is rounded to "a nearby
page boundary".
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
Reported-by: Mel Gorman <mel@csn.ul.ie>