Skip to content

Commit

Permalink
avoid race condition in Lmod spider json file (#1081)
Browse files Browse the repository at this point in the history
Avoid race condition in Lmod spider json file by using a tempfile and mv commands.
  • Loading branch information
simonLeary42 authored Feb 20, 2025
1 parent 1e5fa82 commit acf1a04
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/reference/files/ondemand-d-ymls.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit acf1a04

Please sign in to comment.