[prog] Segmentation fault :-(

Sujita Purushothaman sujita at mimos.my
Tue Sep 24 17:06:19 EST 2002


Conor Daly wrote:

> Another thing to remember, IIRC, is that printf() and fprintf() are often
> asynchronous.  The printf() inside the "BaseSocket::Receive()" function may
> happen but the program segfaults _before_ the buffer is flushed to the
> console.  I'm not entirely sure about that but I seem to remember suffering
> for it in the past...  Adding a fflush(stdout); after the printf() might
> help there.

haaah , yes, adding the fflush shows me the segfault is somewhere else.

Thanks!
Rgds,
Sujita





More information about the Programming mailing list