Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:28683 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 89749 invoked by uid 1010); 5 Apr 2007 12:28:22 -0000 Delivered-To: ezmlm-scan-internals@lists.php.net Delivered-To: ezmlm-internals@lists.php.net Received: (qmail 89734 invoked from network); 5 Apr 2007 12:28:22 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 5 Apr 2007 12:28:22 -0000 Authentication-Results: pb1.pair.com smtp.mail=ilia@prohost.org; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=ilia@prohost.org; sender-id=unknown Received-SPF: error (pb1.pair.com: domain prohost.org from 64.233.166.180 cause and error) X-PHP-List-Original-Sender: ilia@prohost.org X-Host-Fingerprint: 64.233.166.180 py-out-1112.google.com Linux 2.4/2.6 Received: from [64.233.166.180] ([64.233.166.180:51207] helo=py-out-1112.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 37/10-19248-56BE4164 for ; Thu, 05 Apr 2007 08:28:22 -0400 Received: by py-out-1112.google.com with SMTP id a25so254647pyi for ; Thu, 05 Apr 2007 05:28:18 -0700 (PDT) Received: by 10.35.40.10 with SMTP id s10mr3180471pyj.1175776098616; Thu, 05 Apr 2007 05:28:18 -0700 (PDT) Received: from ?192.168.1.155? ( [204.101.63.110]) by mx.google.com with ESMTP id w67sm3164902pyg.2007.04.05.05.28.18; Thu, 05 Apr 2007 05:28:18 -0700 (PDT) In-Reply-To: <46148933.7030709@lerdorf.com> References: <007b01c77735$89410420$0201a8c0@pc1> <46148933.7030709@lerdorf.com> Mime-Version: 1.0 (Apple Message framework v752.3) Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed Message-ID: <646617A7-86A7-4E64-94CE-8E5D5766741A@prohost.org> Cc: Matt Wilmas , internals@lists.php.net Content-Transfer-Encoding: 7bit Date: Thu, 5 Apr 2007 08:28:16 -0400 To: Rasmus Lerdorf X-Mailer: Apple Mail (2.752.3) Subject: Re: [PHP-DEV] Build failure From: ilia@prohost.org (Ilia Alshanetsky) Rasmus, Sorry for the delay in the reply. According to my tests on linux using the sample script provided by the original bug reporter having no lock causes a problem when the error message is >4k in length. In this case multiple buffers are used and corruption can happen (it did on a dual cpu machine with 10 error log writing threads running), which is why I feel the lock is needed. On 5-Apr-07, at 1:29 AM, Rasmus Lerdorf wrote: > Matt Wilmas wrote: >> Hi, >> >> Maybe just a Windows problem if it wasn't noticed yet, but I was >> compiling >> the latest 5.2 snapshot and got: >> >> main.obj : error LNK2019: unresolved external symbol _php_flock >> referenced >> in function _php_log_err >> Release_TS\php5ts.dll : fatal error LNK1120: 1 unresolved externals >> >> Caused by this recent commit, http://news.php.net/php.cvs/43683, >> and I >> commented the php_flock line as a workaround. The Windows 5.2 >> snapshots >> haven't been updated because of this either, of course. > > I see no reason for that lock at all as I commented when this was > committed, but Ilia never replied. This is a single write > operation now > since those fprintf's are now one, so that part of the fix is good, > but > the lock call is not needed since single writes in append mode are > atomic, even on Windows. > > So, your work around is fine and should actually be committed. > > -Rasmus > > -- > PHP Internals - PHP Runtime Development Mailing List > To unsubscribe, visit: http://www.php.net/unsub.php > Ilia Alshanetsky