[lug] [Sorta-OT] Linux->Solaris Porting Bug
Hugh Brown
hugh at math.byu.edu
Mon Sep 15 20:23:44 MDT 2003
On Mon, 2003-09-15 at 17:29, David Morris wrote:
> Appologies for the (mostly) OT post, but I'm getting close
> to my wits end on a bug:
>
> I'm porting an application I wrote from Linux (x86) to
> Solaris 8 (sparc). Everything works just fine with only
> linking changes with one exception: I cannot redirect
> output from the program. For example:
>
> a.out > foo.txt
>
> The file "foo.txt" is empty. The application is (I think)
> at least partially running, but it definately is not at full
> functionality (has several network connections and keyboard
> input to test with).
>
> A few items of note:
>
> - compiler is gcc 3.1
> - multi-threded using pthreads
> - stdio routines for i/o (e.g. printf)
> - 7 active TCP/IP communication sockets.
> - A test program (print ("hello world\n");) works normally
>
> Has anyone come accross a problem like this before, or have
> any ideas on where to look for possible problems?
>
> --David
>
I am not a programmer by any stretch of the imagination, but I have had
problems of this sort when file i/o was buffered. I had to have enough
data to write out before anything actually got written. Usu. there is a
way to flush the write buffer or to do unbuffered i/o.
FWIW,
Hugh
More information about the LUG
mailing list