sensord exits on any error

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Andy,

On Fri, 12 Dec 2008 15:45:35 -0600 (CST), Andy Poling wrote:
> It is kind of embarrassingly simple.  I hope a unified diff is acceptable.

A unified diff is perfect. However I do not think the fix is as simple
as you suggested. The original code has a rather fragile way to handle
sleep times between actions, and now that failures no longer break the
loop, odd things can happen. In particular, with your patch, I hit a
case where the system log would get filled at a very high rate on
permanent errors, presumably because sleep() was called with negative
values.

Please see my attached patch which hopefully fixes all the issues. It
worked fine for me. Main differences with your original patch:
* Errors on reloadLib() are logged.
* Errors are logged using sensorLog() instead of syslog().
* Error messages use %d instead of %m. %m read errno but the sensord
  code doesn't set errno.
* Each of the 3 actions are handled separately, even if one fails, the
  other ones are attempted.

Please give it a try and report.

Thanks,
-- 
Jean Delvare
-------------- next part --------------
A non-text attachment was scrubbed...
Name: sensord-survive-transient-errors.patch
Type: text/x-patch
Size: 1908 bytes
Desc: not available
Url : http://lists.lm-sensors.org/pipermail/lm-sensors/attachments/20081214/22fa51f1/attachment.bin 


[Index of Archives]     [Linux Kernel]     [Linux Hardware Monitoring]     [Linux USB Devel]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [Yosemite Backpacking]

  Powered by Linux