Re: Bug #2167: configure incorrectly identifies flock() as available

From: Date: Fri, 27 Aug 1999 16:06:41 +0000
Subject: Re: Bug #2167: configure incorrectly identifies flock() as available
References: 1 2  Groups: php.dev 
Request: Send a blank email to php-dev+get-10257@lists.php.net to get a copy of this message
> If nothing else, if PHP *does* fall back to emulating flock over fcntl > (specifically), it would be useful to have a #warning in the compile > stating that using flock might not work as expected. Since flock is hardly used by PHP, we can savely assume that we are not affected by the semantical differences between flock and SysV/POSIX locking (fcntl), if the compatibility layer is used. The main reason to introduce that layer was to clean up existing code which used ugly #ifdefs, or did not perform any locking at all, if flock was not available. To demonstrate whom affects this difference, FreeBSD's fcntl(2) contains an example: "For example if an application for updating the password file locks the password file database while making the update, and then calls getpwnam(3) to retrieve a record, the lock will be lost because getpwnam(3) opens, reads, and closes the password database. The database close will release all locks that the process has associated with the database, even if the library routine never requested a lock on the database." We might add an appropiate warning to the manual, so that people are at least aware of the possibility of a problem. -- Regards, Sascha Schumann Consultant

« previous php.dev (#10257) next »