]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/commit
MFC: r261146
authorache <ache@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 28 Jan 2014 13:29:54 +0000 (13:29 +0000)
committerache <ache@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Tue, 28 Jan 2014 13:29:54 +0000 (13:29 +0000)
commit2a081de1b2f8be1ab55475eb4f1c1c933aaa044e
tree8c6a003f373aabc140a3d2b62d8b330c4aa809dc
parent1ccebcf96f19b1bde7f18ac076095b75ad7925b6
MFC: r261146

Bad timespec_subtract() calculations produce negative tv_nsec on i386
which cause EINVAL returned from nanosleep() which cause loop in
cron_sleep() and making all cron jobs to start about 30 seconds earlier
(which cause f.e. logfiles rotation by newsyslog delayed by 1 hour).

Use simple and proved calculations from kernel's timespecsub() instead.

git-svn-id: svn://svn.freebsd.org/base/stable/10@261231 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.sbin/cron/cron/cron.c