John Gaughan wrote:
> attempt to flock() fails. One other thing. I'm not sure it this is normal
> behaviour for the libc version of flock(), but if the file has been locked
> already, perl's flock() appears to wait for the first lock to be released
> and then locks the file, rather than returning an error.
According to the flock(2) manpage this is correct. If you want
nonblocking behaviour use LOCK_NB and flock will fail with errno =
EWOULDBLOCK
Donnchadh
--
// Donnchadh O Donnabhain mailto:d_odonnabhain at vistech.ie
// Vistech Software http://www.vistechsoftware.com
// Inchvale House, Douglas West, Cork, Ireland
// Ph. +353-21-918166 Fax +353-21-896142
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!