httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From (Robert S. Thau)
Subject Re: Additional serialization code
Date Tue, 08 Aug 1995 12:23:42 GMT
   From: Jim Jagielski <>
   Date: Tue, 8 Aug 1995 10:51:09 -0400 (EDT)
   Precedence: bulk

   Robert S. Thau writes:
   > On review of this code, it's got a bit of a problem
   > obtained by a different open()) call, and all subsequent flock() calls
   > --- in the same process or a different one --- simply verify that the
   > lock is still held and return (which is very fast, but, unfortunately,
   > does nothing at all about mutual exclusion).

   If the lock is exclusive, then the next call to lock, if already locked,
   should block until the lock is released.

Only if the processes have different locks --- the problem is that
since the processes are sharing the same file descriptor to the error
log, they share the same lock as well (either all of them have it, or
none of them do, so they can't exclude each other) --- flock() locks
behave like this; fcntl() locks are owned by processes and not by
descriptors, so they don't.


View raw message