system_printf

egor duda deo@logos-m.ru
Sun May 6 05:19:00 GMT 2001


Hi!

Sunday, 06 May, 2001 Robert Collins robert.collins@itdomain.com.au 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
http://sources.redhat.com/ml/cygwin-patches/2001-q1/msg00106.html )
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.            mailto:deo@logos-m.ru ICQ 5165414 FidoNet 2:5020/496.19




More information about the Cygwin-developers mailing list