[comp.unix.questions] WIERD error regarding fprintf

mahesh@composer.helios.nd.edu (mahesh) (05/02/90)

I ran into this while coding on my NeXT.  The compiler is
gcc.  The program is rather large and involved, so tracking the 
specific bug is quite difficult, and I'm hoping for a quick fix
from someone in the know :-) !!

PROBLEM
The program runs fine, and output is basically of the form
ofa single fprintf statement, as in 
	fprintf(stdout,......);
Now, running the command
	a.out
results in the output appearing on the screen.  But, running
	a.out > <some_file>
results in a Bus Error!  Further, replacing the fprintf by
	fprintf(out_file,.....);
is fine!!

I've since replaced the fprintf statements, but the above problem
has been nagging me for a while now.  Anyone out there
have any ideas as to whats wrong??

Please e-mail me.

Thanx



Mahesh Subramanya                     INTERNET: mahesh@darwin.cc.nd.edu
Senior Analyst                        UUCP:     ndmath!mahesh
Office of University Computing        NeXT:     mahesh@numenor.cc.nd.edu
University of Notre Dame              Voice:    (219) 239-5600  x6421
Notre Dame,  IN  46556