mirror of https://github.com/mkerrisk/man-pages
time.2: Explain why the glibc time() wrapper never sets 'errno'
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
parent
1ccb57efbc
commit
300c07ddd8
16
man2/time.2
16
man2/time.2
|
@ -51,7 +51,7 @@ appropriately.
|
|||
.TP
|
||||
.B EFAULT
|
||||
.I t
|
||||
points outside your accessible address space.
|
||||
points outside your accessible address space (but see BUGS).
|
||||
|
||||
On systems where the C library
|
||||
.BR time ()
|
||||
|
@ -82,6 +82,20 @@ and the Epoch, because of leap seconds and because system clocks are not
|
|||
required to be synchronized to a standard reference.
|
||||
The intention is that the interpretation of seconds since the Epoch values be
|
||||
consistent; see POSIX.1-2008 Rationale A.4.15 for further rationale.
|
||||
.SH BUGS
|
||||
Error returns from this system call are indistinguishable from
|
||||
successful reports that the time is a few seconds
|
||||
.I before
|
||||
the Epoch, so the C library wrapper function never sets
|
||||
.I errno
|
||||
as a result of this call.
|
||||
|
||||
The
|
||||
.I t
|
||||
argument is obsolescent and should always be NULL in new code.
|
||||
When
|
||||
.I t
|
||||
is NULL, the call cannot fail.
|
||||
.SH SEE ALSO
|
||||
.BR date (1),
|
||||
.BR gettimeofday (2),
|
||||
|
|
Loading…
Reference in New Issue