syslog

Christopher Faylor cgf@redhat.com
Sat Feb 22 20:44:00 GMT 2003


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



More information about the Cygwin-patches mailing list