github.com/lmorg/murex@v0.0.0-20240217211045-e081c89cd4ef/builtins/core/io/lockfile_doc.yaml (about) 1 - DocumentID: lockfile 2 Title: >+ 3 `lockfile` 4 CategoryID: commands 5 Summary: >- 6 Create and manage lock files 7 Description: |- 8 `lockfile` is used to create and manage lock files 9 Usage: |- 10 Create a lock file with the name `identifier` 11 12 ``` 13 lockfile lock identifier 14 ``` 15 16 Delete a lock file with the name `identifier` 17 18 ``` 19 lockfile unlock identifier 20 ``` 21 22 Wait until lock file with the name `identifier` has been deleted 23 24 ``` 25 lockfile wait identifier 26 ``` 27 28 Output the the file name and path of a lock file with the name `identifier` 29 30 ``` 31 lockfile path identifier -> <stdout> 32 ``` 33 Examples: |- 34 ``` 35 lockfile lock example 36 out "lock file created: ${lockfile path example}" 37 38 bg { 39 sleep 10 40 lockfile unlock example 41 } 42 43 out "waiting for lock file to be deleted (sleep 10 seconds)...." 44 lockfile wait example 45 out "lock file gone!" 46 ``` 47 Detail: |- 48 Synonyms: 49 Related: 50 - out 51 - bg