#730083 digitemp: Digitemp tries to access descriptior after close

Package:
digitemp
Source:
digitemp
Description:
read temperature sensors in a 1-Wire net
Submitter:
Alexander Inyukhin
Date:
2013-11-21 05:03:07 UTC
Severity:
normal
#730083#5
Date:
2013-11-21 04:51:55 UTC
From:
To:
Digitemp in daemon mode do not handle disappearing devices (e.g. DS9097
via usb to serial adapter).
It closes the fd, but tries to access that descriptor forever afterwards.

I suggest a workaround that works on my system for a long time.
It contains two patches.

The first patch (close.patch) helps to forget fd after close, overwriting fd value
with -1.
The second patch (assert.patch) calls assert when digitemp tries to access closed descriptor.

This is not real solution since error is handled by assert in library,
but it works fine, when digitemp daemon is running under an external
supervisor, that restarts failing processes.