Nonflushing fclose() is a PROBLEM
David R. Blythe
blythe at sgi.com
Mon Jun 17 07:49:45 AEST 1991
In article <8810253 at um.cc.umich.edu> Tim_Buxton at UM.CC.UMICH.EDU writes:
>Netlanders:
>
>We are having serious intermittent problems as we *try* to communicate
>between processes using fscanf() and fprintf(). We had used
>pipes previously, with success. When we added signal handling
>to the processes however, the pipes "broke", and according to the
>documentation, this is Just the Way It Is; pipes become nonblocking
>when signals are used. Writing to/reading from a scratch file
>seemed a logical alternative.
I'm not sure I agree. using select() or a simple read() loop until you
encounter the record delimiter (i.e. '\n') on the read end would work
fine with pipes, sockets, etc ... Then pass the accumulated buffer to
sscanf().
david blythe
More information about the Comp.sys.sgi
mailing list