in reply to Re: flock for same file different scripts
in thread flock for same file different scripts

Thanks, grantm - that's eased my concern...

Just for the record I have the impression that flock works on the filehandle rather than the file - is it the case that filehandles in all scripts should use the same name in order to flock properly, or is it the path/filename which holds sway?

It's not a problem as I have used the same filehandle anyway, but just to get to the bottom of this...
  • Comment on Re: Re: flock for same file different scripts

Replies are listed 'Best First'.
Re: Re: Re: flock for same file different scripts
by grantm (Parson) on Apr 20, 2003 at 22:24 UTC

    No, it's definitely the pathname that you're locking. The name you chose for the filehandle when you opened the file is not relevant to the locking process.

      That's great - thanks once again for your input, grantm