Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!sgi!shinobu!odin!blythe From: blythe@sgi.com (David R. Blythe) Newsgroups: comp.sys.sgi Subject: Re: Nonflushing fclose() is a PROBLEM Message-ID: <1991Jun16.214945.25164@odin.corp.sgi.com> Date: 16 Jun 91 21:49:45 GMT References: <8810253@um.cc.umich.edu> Sender: news@odin.corp.sgi.com (Net News) Organization: Silicon Graphics, Inc., Mountain View, CA Lines: 16 In article <8810253@um.cc.umich.edu> Tim_Buxton@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