in reply to strange flock and alarm behavior

I have seen that signal info before. I've done some more digging, and I can of course avoid the problem by just looping and using the LOCK_NB flag. I've implemented and tested that with success. The file I was locking was also on NFS, and when I tried it with a local file the problem does not exist either. This is good enough for my purposes, since I'm be using it on a local file in actual usage. My development is just done on an NFS share.

Replies are listed 'Best First'.
Re^2: strange flock and alarm behavior
by afoken (Chancellor) on Jan 17, 2011 at 22:38 UTC

    At least some NFS implementations and locks don't mix too well. Several experts consider locks on NFS at least unreliable. Maybe things changed with newer NFS versions, but I would not bet on that.

    Alexander

    --
    Today I will gladly share my knowledge and experience, for there are no sweeter words than "I told you so". ;-)