Who should close the file descriptor?

David Conrad dave at tygra.UUCP
Sun Mar 3 19:48:26 AEST 1991


In article <2171 at cs.rit.edu> dxl2585 at cs.rit.edu (Derek X Lee-Wo) writes:
>In article <27C4E07F.6689 at maccs.dcss.mcmaster.ca> ce3wa3bh at 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 at DDMI.COM



More information about the Comp.lang.c mailing list