workhorsy / py-cpuinfo

A module for getting CPU info with pure Python
MIT License
312 stars 59 forks source link

On non BeOS systems, calling sysinfo may open GUI program #136

Closed johann-petrak closed 4 years ago

johann-petrak commented 4 years ago

When calling cpuinfo.get_cpu_info() this package seems to try to run the command sysinfo -cpu if it finds that such a command is available. This is not a default package on Ubuntu 18.04 but after installing the package sysinfo using sudo apt install sysinfo, there is a script called /usr/bin/sysinfo This script invokes a mono program mono Sysinfo.exe which seems to ignore all command line arguments. The GUI shows the following about information: "Sysinfo 0.7 Copyright Nil Gradisnik 2006 ghaefb@gmail.com" http://sourceforge.net/projects/gsysinfo

Since this GUI program is invoked, the call to get_cpu_info() hangs until the GUI is terminated. Since this package is used in a number of other tools and packages, this is a real problem on systems where the "sysinfo" package is installed.

workhorsy commented 4 years ago

I'll add a check that only runs sysinfo on BeOS/Haiku.

workhorsy commented 4 years ago

Should be fixed now. Thanks.