From: Paul Hänsch Date: Mon, 7 Sep 2020 02:31:56 +0000 (+0200) Subject: avoid race condition by using per-process temp files X-Git-Url: https://git.plutz.net/?a=commitdiff_plain;h=cd0d72e6e5e47ebc3c2d5dd723aa9244748eeafc;p=lobster avoid race condition by using per-process temp files --- diff --git a/therapies/update_therapy.sh b/therapies/update_therapy.sh index 70fdea2..0474b3b 100755 --- a/therapies/update_therapy.sh +++ b/therapies/update_therapy.sh @@ -21,7 +21,7 @@ tpy="$(POST id)" tpyfile="$_DATA/therapies/${tpy}.tpy" -tempfile="$_DATA/temp/${tpy}.tpy" +tempfile="$_DATA/temp/${tpy}.$$.tpy" if [ "$(POST tid)" != "$(transid "$tpyfile")" ]; then if [ "$(POST autosubmit)" = "true" ]; then