Remix.run Logo
jesperwe a day ago

I wonder how they implement is_computer_on() under Linux?

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

dleslie a day ago | parent | next [-]

In the simplest way. More interesting is the result for is_computer_on_fire()

https://github.com/VitruvianOS/Vitruvian/blob/0e4c6e33ab235b...

MBCook a day ago | parent | next [-]

Why does it return a double?

MegaDeKay a day ago | parent | next [-]

I was wondering about the significance of the returned value 0.63739. Best explanation I found was this HN post [0]: "Referencing a US telephone keypad, it spells NERDY"

https://news.ycombinator.com/item?id=29292424

dleslie a day ago | parent | prev [-]

Per the BeBook:

> Returns the temperature of the motherboard if the computer is currently on fire.

jesperwe a day ago | parent | prev [-]

Cheating. Not involving the kernel at all.

fragmede a day ago | parent | prev [-]

on fire

> The following functions, types, and structures are used to convey basic information about the system, such as the number of CPUs, when the kernel was built, what time it is now and whether your computer is on fire.

cestith a day ago | parent [-]

That’s sometimes a handy diagnostic if it’s a remote, headless system.