tru64-unix-managers (formerly alpha-osf-managers) (1994-2012)
 help / color / mirror / Atom feed
From: Don Newcomer <newcomer () dickinson ! edu>
To: tru64-unix-managers
Subject: SYMMARY: Redirecting a C program's STDOUT
Date: Wed, 23 May 2001 21:06:15 +0000	[thread overview]
Message-ID: <102653647622071.tru64-unix-managers.marc@archive.invalid> (raw)

That didn't take long!  All I had to do was to add 'fflush(stdout)' after
the 'printf()' and it worked like a charm.  Thanks to:

Christophe Colle <christophe.colle@telenet.be>
K. Russell <russell@ais.alumdev.oberlin.edu>
"Daniel, Steve" <Steve.Daniel@netapp.com>
Daniel Monjar <dam@orgtek.com>
"Weirick, Robert" <Robert.Weirick@compaq.com>


================================================================================
Don Newcomer                                            Dickinson College
Associate Director, System and Network Services		P.O. Box 1773
newcomer@dickinson.edu                                  Carlisle, PA  17013
                                                        Phone: (717) 245-1256
                                                          FAX: (717) 245-1690

On Wed, 23 May 2001, Don Newcomer wrote:

> This seems really simple but I can't make it work.  I'm running Tru64
> V4.0D.  I have a little C program that looks like this:
>
> #include <stdio.h>
>
> main (argc, argv)
> int argc;
> char **argv;
> {
>         while (1) {
>                 printf( "testing\n" );
>                 sleep( 3 );
>         }
> }
>
> If I compile and run it, it generate the lines like you'd expect.  HOWEVER,
> if I run it with STDOUT redirected to a file, nothing appears in the file.
>
> 	abc >& abc.log &
>
> The log is always empty.  Any idea what I'm missing here?
>
> ================================================================================
> Don Newcomer                                            Dickinson College
> Associate Director, System and Network Services		P.O. Box 1773
> newcomer@dickinson.edu                                  Carlisle, PA  17013
>                                                         Phone: (717) 245-1256
>                                                           FAX: (717) 245-1690
>
>

                 reply	other threads:[~2001-05-23 21:06 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed
read-only archive

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox