[pulseaudio-tickets] [PulseAudio] #335: Setting system time causes Pulse Audio daemon to exit.

PulseAudio trac-noreply at tango.0pointer.de
Tue Aug 5 13:05:52 PDT 2008


#335: Setting system time causes Pulse Audio daemon to exit.
------------------------------------------+---------------------------------
 Reporter:  anstedt                       |       Owner:  lennart
     Type:  defect                        |      Status:  new    
 Priority:  normal                        |   Milestone:         
Component:  daemon                        |    Severity:  normal 
 Keywords:  time, daemon, exit, cpulimit  |  
------------------------------------------+---------------------------------
 cpulimit.c uses the function time() for calculations of CPU usage. It uses
 calls to time to determine time intervals versus CPU usage. This causes a
 problem if after the function time() is first called and the the system
 time is set back in time, for instance during daylight savings time
 changes, and then time() is called again the time interval is not correct
 and cpulimit will cause the daemon to exit.

 A simple solution is to use the monotonic clock function call:
 clock_gettime(CLOCK_MONOTONIC, ...) to get the time and since setting the
 system time does not effect this time, cpulimit can then properly
 calculate the CPU load and work as expected.

-- 
Ticket URL: <http://www.pulseaudio.org/ticket/335>
PulseAudio <http://pulseaudio.org/>
The PulseAudio Sound Server


More information about the pulseaudio-bugs mailing list