Get a stream for the descriptor:
Don't do this with the read descriptor, obviously (you have no need to anyway).Code:FILE *pipestream = fdopen(pipe[PIPE_WR],"w"); fflush(pipestream);
You can also set the stream to unbuffered with setvbuf().
Get a stream for the descriptor:
Don't do this with the read descriptor, obviously (you have no need to anyway).Code:FILE *pipestream = fdopen(pipe[PIPE_WR],"w"); fflush(pipestream);
You can also set the stream to unbuffered with setvbuf().
Last edited by MK27; 02-18-2010 at 10:47 AM.
C programming resources:
GNU C Function and Macro Index -- glibc reference manual
The C Book -- nice online learner guide
Current ISO draft standard
CCAN -- new CPAN like open source library repository
3 (different) GNU debugger tutorials: #1 -- #2 -- #3
cpwiki -- our wiki on sourceforge