This is the mail archive of the cygwin 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: stdout output missing, but redirecting works


On Fri, Dec 9, 2011 at 12:44 PM, Larry Hall (Cygwin) wrote:
> On 12/9/2011 2:47 PM, Brian Craft wrote:
>>
>> I compiled a program yesterday which output some lines to stdout. It
>> appeared to be working. Running it today, I get nothing on stdout.
>> However, if I redirect stdout to a file, the correct output appears in
>> the file. E.g.
>>
>> # no output
>> ./foo
>> # "hello world" in bar
>> ./foo> ?bar
>>
>>
>> In between yesterday and today, I've rebooted and run rebaseall, so
>> perhaps one of those is responsible for the change.
>>
>> Any suggestions?
>
>
> Sounds like buffering to me. ?Is this program compiled with Cygwin's gcc
> or something else? ?What kind of terminal are you running it in? ?Same one
> as yesterday?

Cygwin's g++. The default cygwin terminal.

Another bit of data: if I explicitly redirect the output to /dev/tty0,
I also get no output. E.g.

# outputs "hello"
echo hello > /dev/tty0
# no output
./foo > /dev/tty0

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple


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