getconf(1) might want to support glibc specific _NPROCESSORS_ONLN
Bugzilla ID | 66 |
Reporter | A. Wilcox (awilfox) |
Assignee | A. Wilcox (awilfox) |
Reported | 2018-05-30 23:10:17 -0500 |
Modified | 2019-01-09 11:53:26 -0600 |
Status | RESOLVED FIXED |
Version | 0.3 |
Hardware | Adélie Linux / All |
Importance | Normal / trivial |
URL | https://code.foxkit.us/adelie/shimmy/commit/e9de57c22ec7de6c148bab3fefa54584a6039ab8 |
Description
Some build systems (at least strace and glib) seem to decide number of concurrent jobs based on a glibc-specific getconf(1) variable, _NPROCESSORS_ONLN.
It would be useful if we could emulate this. I don't think it is so hard to determine the number of current CPUs from C in Linux. Let's investigate.