fc5 C system call always returning -1

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This may be an old issue but I could not find info in the archives.

u_int num_cpus = system("cat /proc/cpuinfo | grep -c processor > /dev/null");

Has yielded the number of cpus on the system since I used it in RH7.3 and fc3.
Now in fc5, all uses of system("cmd");  return -1

The command executes OK, just the return value is always -1.

u_int num_cpus = system("cat /proc/cpuinfo");
dumps the cpuinfo file to the system console

u_int num_cpus = system("cat /proc/cpuinfo | grep -c processor");
dumps a 2 to the system console, etc.

Any help would be appreciated...
Greg


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux