Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!caen!umich!sharkey!tygra!dave From: dave@tygra.UUCP (David Conrad) Newsgroups: comp.lang.c Subject: Re: Who should close the file descriptor? Message-ID: <1991Mar3.094826.25765@tygra.UUCP> Date: 3 Mar 91 09:48:26 GMT References: <27C4E07F.6689@maccs.dcss.mcmaster.ca> <2171@cs.rit.edu> Organization: CAT-TALK Conferencing System, Detroit, MI Lines: 25 In article <2171@cs.rit.edu> dxl2585@cs.rit.edu (Derek X Lee-Wo) writes: >In article <27C4E07F.6689@maccs.dcss.mcmaster.ca> ce3wa3bh@maccs.dcss.mcmaster.ca (Eric Ho) writes: >>In my progam, two process are spawned, what this two processes doing is >>the parent process write a message to the pipe, and the child process >>read the message from the pipe. After the parent process finished writting, >>should I close the pipe write end file descriptor immediately, or leave this >>to the child. > >When the child process is spawned, it inherits an identical set of file >descriptors as the parent. > >At that point, the child should immediately close the write file descriptor to >the pipe and the parent should close its read file descriptor to the pipe. > >[etc.] What the SHPX does any of this have to do with C? -- David R. Conrad sharkey!tygra!dave -- = CAT-TALK Conferencing Network, Computer Conferencing and File Archive = - 1-313-343-0800, 300/1200/2400/9600 baud, 8/N/1. New users use 'new' - = as a login id. AVAILABLE VIA PC-PURSUIT!!! (City code "MIDET") = E-MAIL Address: dave@DDMI.COM