Re: The time(2) man page conflicts with glibc

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

 



On 12/16/2015 02:53 PM, H.J. Lu wrote:
> On Wed, Dec 16, 2015 at 5:38 AM, Michael Kerrisk (man-pages)
> <mtk.manpages@xxxxxxxxx> wrote:
>> On 12/15/2015 03:17 PM, H.J. Lu wrote:
>>> On Tue, Dec 15, 2015 at 6:16 AM, Andreas Schwab <schwab@xxxxxxx> wrote:
>>>> In which way does it conflict?
>>>
>>> On error, ((time_t) -1) is returned, and errno is set appropriately.
>>
>>
>> So, how would the following text be for the man page?
>>
>>     ERRORS
>>        EFAULT t  points  outside your accessible address space.  On sys‐
>>               tems where the C library time() wrapper  function  invokes
>>               an  implementation  provided by the vdso(7) (so that there
>>               is no trap  into  the  kernel),  an  invalid  address  may
>>               instead trigger a SIGSEGV signal.
>>
> 
> time never sets errno.  You can't tell if it returns error when time
> in libc.a is used.

Yes, but the raw system call can give us EFAULT. That needs to be
documented.

By the way, what's the reason that one can't tell if it returns 
an error when time() in libc.a is used?

Thanks,

Michael

-- 
Michael Kerrisk
Linux man-pages maintainer; http://www.kernel.org/doc/man-pages/
Linux/UNIX System Programming Training: http://man7.org/training/
--
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