Path: utzoo!attcan!uunet!cs.utexas.edu!know!zaphod.mps.ohio-state.edu!swrinde!ucsd!ucbvax!bloom-beacon!eru!luth!sunic!nuug!nososl!olav From: olav@nososl.UUCP (Olav Eide) Newsgroups: comp.lang.c Subject: pclose hangs Keywords: sigsetmask,pclose Message-ID: <65@nososl.UUCP> Date: 2 Aug 90 09:59:11 GMT Reply-To: olav%nososl@nac.no (Jan-Olav Eide) Organization: Nordic Offshore Systems A/S - Drilling Information Services Lines: 27 I have a problems that I hope some of the experts out there can help me with. I open a pipe, and read data from the file descriptor returned by the popen call. The problem occurs when I attempt to close the pipe after having finished reading. The program then hangs in the pclose call and nothing happens until I kill the program. Basically what I have is this : if (( fd = popen("process1 | process2","r")) == NULL) exit(-1); /* Broken pipe */ while ( fgets(line,255,fd)) { . /* various stuff */ . } pclose(fd); /* And this is where it hangs */ It appears that it hangs in a call to sigsetmask. Can anyone enlighten me ?? PS. We're running Integrated Solutions 4.3BSB Thanks.