Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28917 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 49608 invoked by uid 1010); 18 Apr 2007 10:46:29 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 49593 invoked from network); 18 Apr 2007 10:46:29 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 18 Apr 2007 10:46:29 -0000 Authentication-Results: pb1.pair.com smtp.mail=rquadling@googlemail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rquadling@googlemail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain googlemail.com designates 66.249.82.234 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: rquadling@googlemail.com X-Host-Fingerprint: 66.249.82.234 wx-out-0506.google.com Linux 2.4/2.6 Received: from [66.249.82.234] ([66.249.82.234:15538] helo=wx-out-0506.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 6C/F5-10422-307F5264 for ; Wed, 18 Apr 2007 06:46:29 -0400 Received: by wx-out-0506.google.com with SMTP id i27so125997wxd for ; Wed, 18 Apr 2007 03:46:25 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=googlemail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=kYJBbc0SvljNe/Mas8DgOM1m91UVmEIoVnqMaqzvrCxA/Fq1AzVQhKYeX38tTF028VGybvAoQRf+TuM+Rs7BTPjpPjoFIldV8msIs/qbmu+i8SZHDvHRu7ACa/L6DzRy6ORY/hnt3KvpSUrN7DAX3mvtab0sc0cd7lio5kvvvfM= DomainKey-Signature: a=rsa-sha1; c=nofws; d=googlemail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=qvbSImugi/GwRf1gsYT2MLKFrAVbe+9hgqUdYwlO7tB199L7h4DNnv1gezlrLU0bF5aFo9H/Rt/2D2QX4XuHwPh3yd1FhdxbJrXipVtgvtc5rmYycqNzly4q05odtmmHOfKm/DWjDuaCgKZCx7NKEZ5wqLjzmE3w9FhapFiSreE= Received: by 10.78.180.18 with SMTP id c18mr46837huf.1176893184611; Wed, 18 Apr 2007 03:46:24 -0700 (PDT) Received: by 10.78.48.5 with HTTP; Wed, 18 Apr 2007 03:46:24 -0700 (PDT) Message-ID: <10845a340704180346x5244f5afu24ae9ff33f91cee3@mail.gmail.com> Date: Wed, 18 Apr 2007 11:46:24 +0100 Reply-To: RQuadling@GoogleMail.com To: "Rob Richards" Cc: "William A. Rowe, Jr." , "Ilia Alshanetsky" , "Rasmus Lerdorf" , "Matt Wilmas" , internals@lists.php.net In-Reply-To: <4624E0E7.9000109@ctindustries.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <007b01c77735$89410420$0201a8c0@pc1> <3FD3996A-6E63-44BF-88EF-CEB174254995@prohost.org> <10845a340704130642w7c4edf5an8bc41d49c4e1dd86@mail.gmail.com> <4620B813.8080306@ctindustries.net> <10845a340704160155o18e0ef3dj135113d835e633d4@mail.gmail.com> <462365B9.9090502@rowe-clan.net> <10845a340704160507s3a76c55en857999cab90feabe@mail.gmail.com> <46238C3A.8090107@rowe-clan.net> <10845a340704160753w111dbfa6mf1e8275cec11a19b@mail.gmail.com> <4624E0E7.9000109@ctindustries.net> Subject: Re: [PHP-DEV] Build failure From: rquadling@googlemail.com ("Richard Quadling") This looks like it will be available in snaps.php.net in about 40 minutes. Looking forward to it! On 17/04/07, Rob Richards wrote: > Unless anyone sees a way to do this without adding the lock, I'd like to > commit this patch. > It adds a php_flock call only for windows. In doing so I got rid of the > win32/flock files and now compile with flock_compat from main. > > Rob > > > Richard Quadling wrote: > > The testing I'm using is to launch multiple copies of the same PHP > > script simultaneously using php.exe (CLI mode). This could easily be > > multiple FastCGI scripts or multiple ISAPI threads. > > > > On 16/04/07, William A. Rowe, Jr. wrote: > >> Richard Quadling wrote: > >> > So isn't locking the solution for Windows? > >> > >> If this is single writer process, even with multithreads - a mutex > >> is most efficient, otherwise with concurrent writer processes, file > >> locking makes the most sense. > >> > >> Bill > >> > > > > > > Index: ext/standard/config.w32 > =================================================================== > RCS file: /repository/php-src/ext/standard/config.w32,v > retrieving revision 1.4.2.2 > diff -u -r1.4.2.2 config.w32 > --- ext/standard/config.w32 4 Jan 2006 21:31:29 -0000 1.4.2.2 > +++ ext/standard/config.w32 17 Apr 2007 11:34:16 -0000 > @@ -16,5 +16,5 @@ > url_scanner_ex.c ftp_fopen_wrapper.c http_fopen_wrapper.c \ > php_fopen_wrapper.c credits.c css.c var_unserializer.c ftok.c sha1.c \ > user_filters.c uuencode.c filters.c proc_open.c \ > - streamsfuncs.c http.c", false /* never shared */); > + streamsfuncs.c http.c flock_compat.c", false /* never shared */); > > Index: main/main.c > =================================================================== > RCS file: /repository/php-src/main/main.c,v > retrieving revision 1.640.2.23.2.34 > diff -u -r1.640.2.23.2.34 main.c > --- main/main.c 16 Apr 2007 08:09:56 -0000 1.640.2.23.2.34 > +++ main/main.c 17 Apr 2007 11:49:49 -0000 > @@ -63,6 +63,7 @@ > #ifdef PHP_WIN32 > #include > #include "win32/php_registry.h" > +#include "ext/standard/flock_compat.h" > #endif > #include "php_syslog.h" > #include "Zend/zend_exceptions.h" > @@ -362,8 +363,11 @@ > time(&error_time); > strftime(error_time_str, sizeof(error_time_str), "%d-%b-%Y %H:%M:%S", php_localtime_r(&error_time, &tmbuf)); > len = spprintf(&tmp, 0, "[%s] %s%s", error_time_str, log_message, PHP_EOL); > +#ifdef PHP_WIN32 > + php_flock(fd, 2); > +#endif > write(fd, tmp, len); > - efree(tmp); > + efree(tmp); > close(fd); > return; > } > Index: win32/build/config.w32 > =================================================================== > RCS file: /repository/php-src/win32/build/config.w32,v > retrieving revision 1.40.2.8.2.9 > diff -u -r1.40.2.8.2.9 config.w32 > --- win32/build/config.w32 16 Apr 2007 08:09:56 -0000 1.40.2.8.2.9 > +++ win32/build/config.w32 17 Apr 2007 11:39:05 -0000 > @@ -309,7 +309,7 @@ > ADD_SOURCES("main/streams", "streams.c cast.c memory.c filter.c plain_wrapper.c \ > userspace.c transports.c xp_socket.c mmap.c"); > > -ADD_SOURCES("win32", "crypt_win32.c flock.c glob.c md5crypt.c readdir.c \ > +ADD_SOURCES("win32", "crypt_win32.c glob.c md5crypt.c readdir.c \ > registry.c select.c sendmail.c time.c wfile.c winutil.c wsyslog.c globals.c"); > > ADD_SOURCES("regex", "regcomp.c regerror.c regexec.c regfree.c"); > > -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"