Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine
 
PerlMonks  

Re^2: Question about flock and printing to file

by jeffenstein (Hermit)
on Jun 23, 2015 at 17:12 UTC ( [id://1131676]=note: print w/replies, xml ) Need Help??


in reply to Re: Question about flock and printing to file
in thread Question about flock and printing to file

From the man page of flock(2) on Linux, the file descriptors created by fork(2) are considered to be the same instance, as if you were calling flock on the same file descriptor in the same process.

The solution would be to open the file after $pm->start, and close it before $pm->finish, so that flock(2) will consider it as a different file descriptor.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://1131676]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others taking refuge in the Monastery: (6)
As of 2024-03-28 23:40 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found