This is the mail archive of the
mailing list for the glibc project.
The time(2) man page conflicts with glibc
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Michael Kerrisk (man-pages)" <mtk dot manpages at gmail dot com>
- Cc: libc-alpha <libc-alpha at sourceware dot org>, linux-man <linux-man at vger dot kernel dot org>
- Date: Tue, 15 Dec 2015 05:58:20 -0800
- Subject: The time(2) man page conflicts with glibc
- Authentication-results: sourceware.org; auth=none
TIME(2) Linux Programmer's Manual TIME(2)
time - get time in seconds
time_t time(time_t *t);
time() returns the time as the number of seconds since the Epoch,
1970-01-01 00:00:00 +0000 (UTC).
If t is non-NULL, the return value is also stored in the memory pointed
to by t.
On success, the value of time in seconds since the Epoch is returned.
On error, ((time_t) -1) is returned, and errno is set appropriately.
EFAULT t points outside your accessible address space.
SVr4, 4.3BSD, C89, C99, POSIX.1-2001. POSIX does not specify any error
But x86-64 glibc has
0: b8 c9 00 00 00 mov $0xc9,%eax
5: 0f 05 syscall
7: c3 retq
I didn't check what kernel returns when memory is invalid.