Should two exclusive flock(2)'s by same process succeed?

David Herron -- One of the vertebrae david at ms.uky.edu
Thu Jul 27 05:23:25 AEST 1989


In article <136 at uakari.primate.wisc.edu> bin at primate.wisc.edu (Brain in Neutral) writes:
>In other words, the process acquires two exclusive locks.  Am I correct
>in thinking this is a bug in flock?

The Ultrix v3 man page tells me that flock() is for cooperating processes.
Processes should be able to cooperate with themselves ...

On Ultrix v3 the second flock fails returning EWOULDBLOCK

I `feel' that the second lock should succeed ... but haven't read any
of the Official Standards Work so don't know the basis.
-- 
<- David Herron; an MMDF guy                              <david at ms.uky.edu>
<- ska: David le casse\*'      {rutgers,uunet}!ukma!david, david at UKMA.BITNET
<- "Amiga software is as good and as bad as PC software.  The difference is 
<-  that AmigaDOS waves bye-bye before it dies, while the PC just freezes."



More information about the Comp.unix.questions mailing list