From 00a2aff2ba74c4e95a4d20ee79829f2bc5f920fd Mon Sep 17 00:00:00 2001 From: Sverker Eriksson Date: Fri, 9 Mar 2012 11:34:09 +0100 Subject: erts: Fix crash on Linux if /sys/devices/system/node is not readable Fallback on using /sys/devices/system/cpu to get cpu topology, as is already done when node directory doesn't exist. --- erts/lib_src/common/erl_misc_utils.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'erts/lib_src') diff --git a/erts/lib_src/common/erl_misc_utils.c b/erts/lib_src/common/erl_misc_utils.c index 5e94ff19db..4806311dfe 100644 --- a/erts/lib_src/common/erl_misc_utils.c +++ b/erts/lib_src/common/erl_misc_utils.c @@ -834,8 +834,8 @@ read_topology(erts_cpu_info_t *cpuinfo) ix = -1; if (realpath(ERTS_SYS_NODE_PATH, npath)) { - got_nodes = 1; ndir = opendir(npath); + got_nodes = (ndir != NULL); } do { -- cgit v1.2.1