3 ms·
Since the not-on result is 'undefined', a devilish implementer could return 1 for the off case, just to screw with people. (How could this work in theory? Mayb
by dottrap 5y ago
Since the not-on result is 'undefined', a devilish implementer could return 1 for the off case, just to screw with people.
(How could this work in theory? Maybe the computer has a separate watchdog controller board which allows the computer to be turned on and off remotely, and that controller acts as a proxy for the API request.)
- rezonant 5y agoOnly if the watchdog also has a CPU that can run programs when the "real" CPU is off. But then we'd need a is_watchdog_on() to know if that one is powered on, in the case where the wall plug has been pulled.
- yccs27 5y agoMaybe we can forbid the function from returning 1 in the off case. The existence of such a function means that "is this machine running?" is semidecidable - but it's surely not decidable by the machine itself.