1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-05-20 06:56:05 +02:00

44156 (tweaked): zsh/system: Add note about potential flock side-effects

(Minor adjustments to wording and formatting)
This commit is contained in:
Clinton Bunch 2019-03-22 17:11:19 -05:00 committed by dana
parent 5267bdc4ef
commit ea8d3ab3e4
2 changed files with 10 additions and 2 deletions

View File

@ -1,3 +1,8 @@
2019-03-22 dana <dana@dana.is>
* Clinton Bunch: 44156 (tweaked): Doc/Zsh/mod_system.yo: Add
note about potential flock side-effects
2019-03-22 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 44147: Completion/Linux/Command/_free,

View File

@ -177,8 +177,11 @@ locked by opening a file descriptor to the file and applying a lock to
the file descriptor. The lock terminates when the shell process that
created the lock exits; it is therefore often convenient to create file
locks within subshells, since the lock is automatically released when
the subshell exits. Status 0 is returned if the lock succeeds, else
status 1.
the subshell exits. Note that use of the tt(print) builtin with the
tt(-u) option will, as a side effect, release the lock, as will redirection
to the file in the shell holding the lock. To work around this use a
subshell, e.g. `tt((print message) >> )var(file)'. Status 0 is
returned if the lock succeeds, else status 1.
In the second form the file descriptor given by the arithmetic
expression var(fd_expr) is closed, releasing a lock. The file descriptor