This is the mail archive of the cygwin-patches@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: syslog


On Sat, Feb 22, 2003 at 03:13:01PM -0500, Pierre A. Humblet wrote:
>At 02:35 PM 2/22/2003 -0500, Christopher Faylor wrote:
>>Applied with one minor change.  I shortened "Cygwin PID = %u" to just "PID
>%u"
>
>Hmm, I had another look while resolving the conflict and now I wonder
>        fputc ('\n', fp);
>        UnlockFile (fHandle, 0, 0, 1, 0);
>        if (ferror (fp))
>          debug_printf ("error in writing syslog");
>        fclose (fp);
>Shouldn't we fflush before the Unlock, or better remove the
>Unlock altogether? The line is probably still sitting in the 
>stream buffer and Windows won't see a write until the file
>is closed.

That sounds correct.  Feel free to check in a patch for this.  Any improvements
to syslog are welcome.

cgf


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]