From acf1a04cdf262a7ccb0178903b29c5b135b4f47a Mon Sep 17 00:00:00 2001 From: simonLeary42 <71396965+simonLeary42@users.noreply.github.com> Date: Thu, 20 Feb 2025 10:41:57 -0500 Subject: [PATCH] avoid race condition in Lmod spider json file (#1081) Avoid race condition in Lmod spider json file by using a tempfile and mv commands. --- source/reference/files/ondemand-d-ymls.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/reference/files/ondemand-d-ymls.rst b/source/reference/files/ondemand-d-ymls.rst index 2a426544..918f851b 100644 --- a/source/reference/files/ondemand-d-ymls.rst +++ b/source/reference/files/ondemand-d-ymls.rst @@ -625,7 +625,7 @@ Configuration Properties as indicated by the command below. Open OnDemand will read these files and potentially show them in a from for a cluster called **my_cluster**. - ``$LMOD_DIR/spider -o spider-json $MODULEPATH > /some/directory/my_cluster.json`` + ``tmp="$(mktemp)"; "$LMOD_DIR/spider" -o spider-json "$MODULEPATH" > "$tmp"; mv "$tmp" /some/directory/my_cluster.json`` Default Null. No directory given.