Lost console output

Lost console output

Post by Todd Evan » Mon, 19 Feb 2001 09:36:56



I've seem to have lost output from programs to stdout.  Even a simple
printf("hello world\n"); program displays nothing.   Is there a unix command
where I can figure out what happened to stdout?   I'm running Linux.

Thanks,

Todd

 
 
 

Lost console output

Post by Fletcher Glen » Mon, 19 Feb 2001 10:16:39


Are you redirecting stdout?  If so, this cancels the line
by line buffering for stdout.  You can overcome this by
either using fflush(stdout) or using setvbuf() to re-establish
line by line buffering.

--
Fletcher Glenn
to reply remove NOSPAM from my reply address


Quote:> I've seem to have lost output from programs to stdout.  Even a simple
> printf("hello world\n"); program displays nothing.   Is there a unix
command
> where I can figure out what happened to stdout?   I'm running Linux.

> Thanks,

> Todd


 
 
 

Lost console output

Post by Todd Evan » Mon, 19 Feb 2001 14:23:32


Thanks for the reply.   Nothing special, and this used to work a few months
back.   I've also tried the fflush().  Very strange.... It doesn't get any
easier that this:

int main() {

 fprintf( stdout, "Hello World!\n" );
 fflush( stdout );

 return (  0 );

}



> Are you redirecting stdout?  If so, this cancels the line
> by line buffering for stdout.  You can overcome this by
> either using fflush(stdout) or using setvbuf() to re-establish
> line by line buffering.

> --
> Fletcher Glenn
> to reply remove NOSPAM from my reply address



> > I've seem to have lost output from programs to stdout.  Even a simple
> > printf("hello world\n"); program displays nothing.   Is there a unix
> command
> > where I can figure out what happened to stdout?   I'm running Linux.

> > Thanks,

> > Todd

 
 
 

Lost console output

Post by Stephen Bayne » Tue, 20 Feb 2001 22:04:43



> Thanks for the reply.   Nothing special, and this used to work a few months
> back.   I've also tried the fflush().  Very strange.... It doesn't get any
> easier that this:

> int main() {

>  fprintf( stdout, "Hello World!\n" );
>  fflush( stdout );

>  return (  0 );

> }

Is your program called 'test' by any chance?

--

Philips Semiconductors Ltd                  
Southampton SO15 0DJ                        +44 (0)23 80316431 *** NEW ***
United Kingdom                              My views are my own.

 
 
 

Lost console output

Post by Todd Evan » Wed, 21 Feb 2001 04:19:45


yes, go figure... i just checked the man pages for 'test' and that explains
it.  i renamed the test program to 'todd' and it worked.

thanks,

todd



> > Thanks for the reply.   Nothing special, and this used to work a few
months
> > back.   I've also tried the fflush().  Very strange.... It doesn't get
any
> > easier that this:

> > int main() {

> >  fprintf( stdout, "Hello World!\n" );
> >  fflush( stdout );

> >  return (  0 );

> > }

> Is your program called 'test' by any chance?

> --
> Stephen Baynes    CEng  MBCS


- Show quoted text -

Quote:> Philips Semiconductors Ltd
> Southampton SO15 0DJ                        +44 (0)23 80316431 *** NEW ***
> United Kingdom                              My views are my own.

 
 
 

1. Need help: lost console output

Hi,

Our office was struck by lightning last week.  After the investigation of all
computer equipments, I find out that the console of our IBM RS/6000 running
IBM AIX Version 3.1 is not working properly - I have the data line monitor
connected between the console port (/dev/tty0) and the console terminal, and I
am able to log in and do whatever I want.  However, the output shows up on the
data line monitor screen but it does not display on the console terminal
(IBM 3151).  There is a reverse question mark (?) displayed just before the
cursor on the terminal.  According to the manual, I check the terminal
communication setup, and everything looks OK to me.  I also connect this
terminal with another serial port (/dev/tty1) and assign the console as well as
redirect the console output to this port.  After rebooting the system, the
console's login prompt shows up!.  Because of this result, I conclude that the
serial device (S1) was corrupted so I try to move the console port to the other
device (S2) but it does not work (I may do something wrong!), and I also try to
remove and recreate /dev/tty0 but it does not work either.
Does anyone have suggestions that can help me solve this problem?
Any information would be appreciated.  I'm fairly new to this news group, so I
hope I post this question to the right group.  

Thanks in advance,

2. PPTP + Samba ? (and NAT)

3. console output/textmode with matrox g550 on dvi output

4. Linux 2.5.38 [PATCH] IrDA

5. Help with console (/dev/console) output redirection

6. backing up / with tar

7. X-Windows not redirecting console output to console window

8. is cpp ppp? combinet isdn-> ?

9. LOST LOST LOST

10. Lost cron output..

11. Lost subject line on periodic daily security check output

12. Output lost in my window after pipe and fork