egor duda
Sun May 6 05:19:00 GMT 2001


Sunday, 06 May, 2001 Robert Collins wrote:

>> >> > >I notice that system_printf no longer writes to the console. Is
>> >> > > there a replacement function that does?
>> >> >
>> >> > system_printf *does* write to the console.
>> it prints to (GetStdHandle (STD_ERROR_HANDLE))
>> this may be console, and may be not (is stderr is redirected).

RC> Thanks for looking... I ran into this minor problem while debugging the
RC> broadcast problem. I cannot explain _why_ its not always printing, just
RC> that it isn't. ( I had unconditional system_printfs as part of the test
RC> code).

RC> I'll see if I can work up a reproducible test case.

i suspect this can be symptom of tty output code. if some application
runs with stderr directed to tty, GetStdHandle (STD_ERROR_HANDLE) is
read end of pipe from slave to master. so, system_printf puts nessage
into this pipe, but will it appear on console -- depends on correct
master-slave communication. there's at least one known unsolved
problem with that communication, which, afair lead to missing output
from system_printf (see thread )
please note, that attached patch is incorrect, and i still don't know
a good way to work around it. of course, there may be other problems.

Egor.   ICQ 5165414 FidoNet 2:5020/496.19

More information about the Cygwin-developers mailing list