NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: unable to set time very far in the future
RVP <rvp%SDF.ORG@localhost> wrote:
> There is a check in the kernel. In sys/kern/kern_time.c:
>
> 190 /*
> 191 * The time being set to an unreasonable value will cause
> 192 * unreasonable system behaviour.
> 193 */
> 194 if (ts->tv_sec < 0 || ts->tv_sec > (1LL << 36))
> 195 return EINVAL;
Regardless of how we arrived at this value, I think
our manual page should make note of settimeofday(2)
setting errno, so I'm proposing the attached diff.
Sound good?
-Jan
Index: gettimeofday.2
===================================================================
RCS file: /cvsroot/src/lib/libc/sys/gettimeofday.2,v
retrieving revision 1.29
diff -r1.29 gettimeofday.2
32c32
< .Dd December 8, 2015
---
> .Dd October 16, 2022
135a136,141
> .It Bq Er EINVAL
> .Fn settimeofday :
> .Ar tp.tv_sec
> is outside the range [0..2^36] or
> .Ar tp.tv_usec
> is outside the range [0..999,999].
Home |
Main Index |
Thread Index |
Old Index