←back to thread

CPU-X: CPU-Z for Linux

(thetumultuousunicornofdarkness.github.io)
170 points nateb2022 | 1 comments | | HN request time: 0.295s | source
Show context
DrillShopper ◴[] No.44492043[source]
It would really be nice to not have to require a daemon to make this program useful
replies(5): >>44492205 #>>44492304 #>>44492481 #>>44493217 #>>44493449 #
nateb2022 ◴[] No.44493217[source]
c.f. https://github.com/TheTumultuousUnicornOfDarkness/CPU-X/wiki...

the daemon separates userspace from root domain, and ensures that the code running with root privileges is very small and easily auditable

replies(1): >>44495172 #
__turbobrew__ ◴[] No.44495172[source]
Maybe I am dumb, but why does it have to be a daemon? Why not have the user process fork off the privileged binary to collect data and return the results through stdout?
replies(1): >>44495409 #
1. unaindz ◴[] No.44495409[source]
Forking a process is not free and starting one every hundred of a millisecond* seems very expensive. *I'm do not know which frequency it updates the data but it's usually 1 sec to 0.1 sec.