top | item 44287319

(no title)

agildehaus | 8 months ago

Reminds me of BeOS (and now Haiku), which have "is_computer_on()" and "is_computer_on_fire()" both with great descriptions.

https://www.haiku-os.org/legacy-docs/bebook/TheKernelKit_Sys...

discuss

order

throw74848484|8 months ago

I know it is trying to be funny. But those states are quite normal in modern computer with advanced power management. OS should handle wakeups from deep sleep, or state where temperature of motherboard is 200 celsius.

mordae|8 months ago

Unlikely. Nothing is specced beyond 140 Celsius and many parts not beyond 80.

account42|8 months ago

Sleep / hibernate doesn't change anything here - if the computer is in those states, no code is running so it doesn't make sense to query for it, which is the joke. The function isn't called was_computer_running().

yomimiva|8 months ago

vjvjvjvjghv|8 months ago

Makes sense:

is_computer_on() int32 is_computer_on(); Returns 1 if the computer is on. If the computer isn't on, the value returned by this function is undefined.

rkagerer|8 months ago

The latter missed a golden opportunity to be some kind of async event-based trigger.