logoalt Hacker News

jesperweyesterday at 5:35 PM2 repliesview on HN

I wonder how they implement is_computer_on() under Linux?

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


Replies

dleslieyesterday at 5:37 PM

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

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

show 2 replies
fragmedeyesterday at 5:37 PM

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.

show 1 reply