get-app directory to define dir
write-string define fname
@<<p-out dir>>/.lock
end-write-string
num lockid;
while (1) {
lock-file fname id lockid status define lockst
if (lockst == VV_OKAY) {
20
@WORKING
sleep (20);
@DONE
break;
} else if (lockst == VV_ERR_FAILED) {
sleep(1);
@WAITING
continue;
} else if (lockst == VV_ERR_OPEN || lockst == VV_ERR_INVALID) {
@BAD LOCK
return;
}
}
unlock-file id lockid
return;
You are free to copy, redistribute and adapt this web page (even commercially), as long as you give credit and provide a link back to this page (dofollow) - see full license at
CC-BY-4.0. Copyright (c) 2019-2023 Dasoftver LLC. Vely and elephant logo are trademarks of Dasoftver LLC. The software and information on this web site are provided "AS IS" and without any warranties or guarantees of any kind.