Choice of filehandle for flock utility
문제
The flock
utility man page gives the following usage example:
(
flock -s 200
# ... commands executed under lock ...
) 200>/var/lock/mylockfile
Assuming 200
is the filehandle of the lockfile, is there a possibility that during some run it fails, because the same filehandle is already in use by other process? If so, are there any tricks to make sure locking with flock
works reliably?
올바른 솔루션이 없습니다
제휴하지 않습니다 StackOverflow