sigaction(2): return value and errno

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

The following text doesn't seem complete to me, in the Linux
sigaction(2) man-page (from release 3.35, 2011-09-08; but it's similar
in the most recent release):

<quote>
RETURN VALUE
       sigaction() returns 0 on success and -1 on error.

ERRORS
       EFAULT act or oldact points to memory which is not a valid part
of the process address space.

       EINVAL An invalid signal was specified.  This will also be
generated if an attempt is made to change the action for SIGKILL or
SIGSTOP, which cannot be caught or ignored.
</quote>

The RETURN VALUE section doesn't specify how the errors (EFAULT and
EINVAL) can be observed by the programmer, which seems to leave the
ERRORS section incomplete. Typically the error-checking is done with
errno (see the wording of, for example, of read(2): "On error, -1 is
returned, and errno is set appropriately.") Should the man page be
updated to include this boilerplate wording, that errno will be set
appropriately? Assuming this is the actual behavior of sigaction(), I
would recommend:

"On success, 0 is returned. On error, -1 is returned, and errno is set
appropriately."

Thanks,
Brian
--
To unsubscribe from this list: send the line "unsubscribe linux-man" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Kernel Documentation]     [Netdev]     [Linux Ethernet Bridging]     [Linux Wireless]     [Kernel Newbies]     [Security]     [Linux for Hams]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux Admin]     [Samba]

  Powered by Linux