Re: locking problems (Apache's solution)

Jonathan Roy (roy@atlantic.net)
Fri, 30 May 1997 11:18:38 -0400

Message-Id: <3.0.1.32.19970530111838.0070aa90@mail.atlantic.net>
Date: Fri, 30 May 1997 11:18:38 -0400
To: fastcgi-developers@OpenMarket.com
From: Jonathan Roy <roy@atlantic.net>
Subject: Re: locking problems (Apache's solution)


  For what it is worth, looking at Apache's serialized accept() code, they
use a 'whence' of 0 vs fastcgi's SEEK_SET, they make a file in /var/tmp and
lock the file instead of the listening fd, and their lock call is:

    while ((ret = fcntl(lock_fd, F_SETLKW, &lock_it)) < 0 && errno == EINTR)
        continue;

  So they retry on < 0 and ignore EINTR.

-Jonathan


--
Jonathan Roy - roy@idle.com -- Idle Communications, Inc.
Mail rhoefer@cdmag.com to advertise with the Games Domain! 
http://www.gamesdomain.com/ or http://www.gamesdomain.co.uk/