-----Original Message-----
From: Bill Luebkert [mailto:[EMAIL PROTECTED] 
Sent: Friday, November 02, 2007 9:20 AM
To: Wayne Simmons
Cc: 'Mark Knoop'; [email protected]
Subject: Re: Log4perl in CGI scipts

Bill Luebkert wrote:
>On UNIX, I would think there would be no problem writing to a log file
>as long as you were in append mode (at least that's what I recollect from
>my UNIX programming days).


Well this function:

if ( !open (X, ">>", "$conf{LOG}{DIRECTORY}/$conf{LOG}{FILE}") )
{
                warn ("can't open log file");
                return;
}
print X scalar(localtime), "($LOG_LVL_PREFIX[$lvl]) $msg\n";
close (X);

was what was causing the hold up on linux. Perhaps because the open request
was coming from multiple threads of the same process it was treated
differently, because that is append mode, I believe.

I know that I was surprised by this result too, I had the feeling that there
are usually not this kind of problems in UNIX.

-Wayne Simmons.

--
Software Engineer
InterSystems USA, Inc.
303-858-1000 
 



_______________________________________________
ActivePerl mailing list
[email protected]
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to