diff options
Diffstat (limited to 'libnetdata/os.c')
-rw-r--r-- | libnetdata/os.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/libnetdata/os.c b/libnetdata/os.c index e6475a45..e4624be6 100644 --- a/libnetdata/os.c +++ b/libnetdata/os.c @@ -162,7 +162,11 @@ unsigned long read_cpuset_cpus(const char *filename, long system_cpus) { unsigned long ncpus = 0; // parse the cpuset string and calculate the number of cpus the cgroup is allowed to use - while(*s) { + while (*s) { + if (isspace(*s)) { + s++; + continue; + } unsigned long n = cpuset_str2ul(&s); ncpus++; if(*s == ',') { |