settimeofday() & reboot or power cycle

Susan Macchia susan
Wed Jan 17 13:30:50 PST 2007


Hi List,



I have a conundrum I am trying to figure out.  I have a Mandriva 2006 system.  The kernel is 2.6.12-12mdksmp.

I have a process that runs (as root) that calls settimeofday().  
The time is changed and reflected in the UI.  The problem is this:



When 
the system is shutdown and restared cleanly the change in time/date sticks.  If instead the power cycle button is pressed (causing an "unclean" shutdown), the time/date DOESN'T stick (and this is the bug).  I tried waiting for 1/2-1 hour, executing the sync command and the time still doesn't stick.

I also tested this out with the "date" command (independent of my application) and saw the same phenomenon.

Does anyone know if there is a known bug in the kernel?  Does anyone know if there is a patch or work-around?  Iv'e scoured the kernel.org archives and googled, but haven' found much.

Much appreciated,
Susan
 

_____________________________ 

Susan Macchia 

mailto:susan at smacchia.net 

http://www.smacchia.net 

_____________________________ 













More information about the Linux-users mailing list