1
0
mirror of https://github.com/docker/cli.git synced 2026-01-18 08:21:31 +03:00
Files
cli/components/engine/daemon
Pavel Tikhomirov 008c8eb206 Do not treat C.sysconf(C._SC_NPROCESSORS_ONLN) non-zero errno as error
Treat return code -1 as error instead.

People from glibc say that errno is undefined in case of successful
sysconf call according to POSIX standard:
Glibc bug: https://sourceware.org/bugzilla/show_bug.cgi?id=21536

More over in sysconf man it is wrongly said that "errno is not changed"
on success. So I've created a bug to man-pages:
https://bugzilla.kernel.org/show_bug.cgi?id=195955

Background: Glibc's sysconf(_SC_NPROCESSORS_ONLN) changes errno to
ENOENT, if there is no /sys/devices/system/cpu/online file, while
the call itself is successful. In Virtuozzo containers we prohibit
most of sysfs files for security reasons. So we have Run():daemon
/stats/collector.go infinitely loop never actualy collecting stats
from publisher pairs.

v2: add comment

Signed-off-by: Pavel Tikhomirov <ptikhomirov@virtuozzo.com>
Upstream-commit: dec084962eab41eb20b1808955de34cfec4fc8b3
Component: engine
2017-06-01 18:23:49 +03:00
..
2017-05-23 15:01:35 -07:00
2017-05-10 14:16:27 -07:00
2017-05-17 11:46:30 -07:00
2016-11-14 15:15:09 -05:00
2017-05-18 15:26:03 -07:00
2016-09-07 11:05:58 -07:00
2016-10-28 11:06:54 -07:00
2017-05-18 10:57:10 +08:00
2017-05-16 14:25:32 -07:00
2016-11-16 13:38:45 -08:00
2017-02-15 21:57:27 +08:00
2016-11-03 10:05:11 -07:00
2016-11-03 10:05:11 -07:00
2016-11-03 10:05:11 -07:00
2016-11-17 13:10:48 -05:00
2017-05-16 15:09:14 -07:00
2017-02-07 11:08:37 -08:00
2017-05-17 11:46:30 -07:00
2016-11-08 17:41:56 -08:00
2017-05-16 15:11:39 -07:00
2017-02-07 11:08:37 -08:00
2017-02-07 11:08:37 -08:00
2017-02-07 11:08:37 -08:00
2017-02-07 11:08:37 -08:00
2017-02-07 11:08:37 -08:00
2017-05-02 17:38:12 -04:00
2017-05-16 15:11:39 -07:00
2017-05-16 15:11:39 -07:00
2016-12-01 09:38:08 -08:00
2016-10-06 22:48:53 -03:00
2016-09-07 11:05:58 -07:00
2017-05-12 00:30:09 -04:00
2017-05-26 12:54:39 -07:00
2017-01-11 21:35:59 +08:00
2016-12-27 21:46:52 +08:00
2016-09-07 11:05:58 -07:00
2017-05-16 11:30:06 -07:00
2017-02-01 14:43:58 -05:00
2016-09-21 12:36:52 +02:00
2016-09-16 11:56:15 -07:00
2017-05-16 15:11:39 -07:00
2016-11-21 19:56:01 +08:00
2017-05-16 15:11:39 -07:00