A bug, without fflush() !

Patrick Serru patrik at serru.net
Wed Jul 16 20:48:57 CEST 2014


    Hi Mark, hi All,

    You should know that I dont use "curses", nor "ncurses". I think that I 
found a bug. I do not know where it comes from, but I know how it is possible 
to bypass. My application was working properly before making a few changes 
here and there, until the running urxvt window closes without explanation. As 
this was a place where there were displays, I realized it was urxvt, and to 
circumvent the problem, a simple "fflush (stdout);" suffice.

    I would like to know how to use the display urxvt, or more precisely when 
to use "fflush (stdout)." I understood that the display is updated without 
adding "fflush ()" when there is a '\ n' in the string to display. Is it more 
generally when there is possibility of "scrolling" screen in the content 
contained in the string sent to display?

    So, until an external event, in which case there is the need to 
use "flush()" after running: 
printf("Enter your age, please");
printf("Enter your name below, please:\r\n");

    thank you,
Patrick Serru




More information about the rxvt-unicode mailing list