X-RT-Interface: Web X-Mailer: MIME-tools 5.508 (Entity 5.508) Content-Disposition: inline In-Reply-To: References: X-RT-Original-Encoding: utf-8 Message-ID: Content-Transfer-Encoding: binary Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 RT-Send-CC: Content-Length: 1292 On Tue Jul 11 09:30:12 2017, kunschikov@gmail.com wrote: > We are using CentOS as base system and can't switch to BSD. => I said BSDs because it was invented for 4.3 BSD in 1993 (and I used this system at that time). Note adjtime() is supported by Linux too (cd http://man7.org/linux/man-pages/man3/adjtime.3.html) > I am not > sure which signal can be sent to the dhclient in order to recalculate > sleep/wake timestamps. Select can be canceled on signal reception but after > that dhclient is going to sleep again till the next date, which is > calculated not from current time, but from the scheduled one. => you can send a signal to the process (but avoid to kill it). select takes a relative time so if you are lucky it is recomputed with the "new" current time. > I am solving this problem by replacing gettimeofday() with > clock_gettime(CLOCK_MONOTONIC_RAW,..) for dhclient. LD_PRELOAD with > gettimofday()# replacement library does the trick. #Proper solution will > require modification of the dhclient scheduler. => you solution deals with the problem at its root (not increasing gettimeofday). I am not sure it is correct to modify the scheduler: the assumption the current time is increasing is not so crazy... > Thanks for quick reply. => can we close the ticket?