This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC 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: simple c 's printf problem in mandrake8.0


Dear Stephano:

  I tried to put what you suggest fflush(stdout), either before or after
printf("hello World") , it still not print in bash shell.

  or I type fflush(stdout) in my bash command line, it response command
not found.

  Would you mind to explain a little bit more, 
> It's always a good idea to flush before you close a stream

on redhat 7.1 , it works(although whether it is bash or any other
shell), so far as I know only mandrake8 is not work.

sincer eric, http://www.ezinfocenter.com/4436786
  
  
  Stephano Mariani wrote:
> 
> The cause is a bug in the libc on mandrake 8.x and redhat 7.x
> In order to explicitly flush the buffer just use the fflush on the
> stream you want to flush. E.g. fflush(stdout) in this case.
> 
> It's always a good idea to flush before you close a stream.
> 
> Stephano Mariani
>


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