Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28923 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 9693 invoked by uid 1010); 19 Apr 2007 07:57:52 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 9656 invoked from network); 19 Apr 2007 07:57:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 19 Apr 2007 07:57:52 -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.92.173 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.92.173 ug-out-1314.google.com Linux 2.4/2.6 Received: from [66.249.92.173] ([66.249.92.173:24989] helo=ug-out-1314.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id EF/59-23065-4D027264 for ; Thu, 19 Apr 2007 03:57:10 -0400 Received: by ug-out-1314.google.com with SMTP id o4so575428uge for ; Thu, 19 Apr 2007 00:57:05 -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=ZeEzvQyykh9Btb/jqR8s5dhQZhCZlSwxO5zp2RNnl4kDOOdk7/5zxMMr+1JfjrT7xTFiJDrnUXUmJz6pzYfCfo3fPJOPT+ROLdwGoctlgUxDgFvsgG89SkWBvuMMYybTWXbd9WjKaJU4p/2Z0IsAL17C36FIDbGDxVhAIH8TT2I= 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=P7F1u1v7HkByLWadNOiuIRXMdcAFddv1TcnGAqzPppAOl8sV2Ob6bA1gqC9lK/pi3UoxCTspgTvLhJGr2+DJbhN2BjHe5dc5Cnw49JsEnjnxkSE2vPFQrJ1MlPanI4MUIOWOHc4AoSpyTcOClaiSzZzTnhm2jS+hKPVj9fNdiA8= Received: by 10.78.140.17 with SMTP id n17mr213700hud.1176969425768; Thu, 19 Apr 2007 00:57:05 -0700 (PDT) Received: by 10.78.48.5 with HTTP; Thu, 19 Apr 2007 00:57:05 -0700 (PDT) Message-ID: <10845a340704190057i7bb731b3md2a5fd2551411485@mail.gmail.com> Date: Thu, 19 Apr 2007 08:57:05 +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: <10845a340704180346x5244f5afu24ae9ff33f91cee3@mail.gmail.com> 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> <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> <10845a340704180346x5244f5afu24ae9ff33f91cee3@mail.gmail.com> Subject: Re: [PHP-DEV] Build failure From: rquadling@googlemail.com ("Richard Quadling") And lo, the snapshot was "A Good Thing". On 18/04/07, Richard Quadling wrote: > 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!" > -- ----- Richard Quadling Zend Certified Engineer : http://zend.com/zce.php?c=ZEND002498&r=213474731 "Standing on the shoulders of some very clever giants!"