aboutsummaryrefslogtreecommitdiffstats
path: root/erts/lib_src
diff options
context:
space:
mode:
authorSverker Eriksson <[email protected]>2012-03-09 11:34:09 +0100
committerSverker Eriksson <[email protected]>2012-03-09 11:34:09 +0100
commit00a2aff2ba74c4e95a4d20ee79829f2bc5f920fd (patch)
treeea352e05ad41a5d691d231c3d2cfe298478a8119 /erts/lib_src
parenta7714f269498e51f02c598446ef8626c380d30b1 (diff)
downloadotp-00a2aff2ba74c4e95a4d20ee79829f2bc5f920fd.tar.gz
otp-00a2aff2ba74c4e95a4d20ee79829f2bc5f920fd.tar.bz2
otp-00a2aff2ba74c4e95a4d20ee79829f2bc5f920fd.zip
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.
Diffstat (limited to 'erts/lib_src')
-rw-r--r--erts/lib_src/common/erl_misc_utils.c2
1 files changed, 1 insertions, 1 deletions
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 {