wdmd: prevent probe while watchdog is used
If the wdmd daemon is killed uncleanly, /dev/watchdog
is closed uncleanly and the watchdog should fire to
reset the machine.
If 'wdmd -p' is run to probe available watchdog devices
after wdmd is killed and before the machine is reset,
it will unintentionally interfere with the expiring
watchdog by doing open/magic-close on each device.
This silently prevents the watchdog from firing when
it should.
The probe function can check for the shm flag before
touching any watchdog devices, just like another wdmd
daemon process does, to avoid interfering with the
watchdog state of a previous wdmd daemon that was
terminated uncleanly.