Re: sigaction(2): return value and errno

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

 



Hi Michael,

On Sat, Apr 20, 2013 at 12:32 PM, Michael Kerrisk (man-pages)
<mtk.manpages@xxxxxxxxx> wrote:
> On Thu, Apr 18, 2013 at 8:50 PM, Brian Norris <computersforpeace@xxxxxxxxx>
> wrote:
>> 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."
>
> Yes, the page should be more consistent. I've applied a fix similar to what
> you suggest.

Great! I don't see it in git yet
(http://git.kernel.org/cgit/docs/man-pages/man-pages.git), but I'll
assume you have it in hand.

Regards,
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