Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [cdt-dev] Console Window Problem - CDT [ C,C++ Plugin]

> 
> https://bugs.eclipse.org/bugs/show_bug.cgi?id=27663
> 
> CC yourself, vote for it or help fix it.
> 

8-)

There is a possible solution, we could use ProcessFactory(Spawner) class
and when spawning the application dup its stdin/stdout/stderr to pseudo tty.
Caveat, not all platforms support pseudo ttys.
For example windows.

To the orignal poster basically what your seeing is the stdio
buffering discipline, by default if not a tty(istty()) stdio calls
are not line buffered.
 
>    //Johan
> 
> Jeba Anandhan A wrote / skrev:
> > hi,
> > i have written one  c program
> > 
> > int main(){
> > int a;
> > printf("enter no \n");
> > scanf("%d",&a);
> > printf("a=%d",a);
> > return 0;
> > }
> > 
> > The expected output is
> > enter no
> > somevalue
> > a=somevalue
> > but the resultant output in console window is
> > somevalue
> > enter no
> > a=somevalue
> > 
> > 
> > whatz wrong with Console window.how to rectify it?
> > 
> > 
> > 



Back to the top