Who should close the file descriptor?

Chris Torek torek at elf.ee.lbl.gov
Wed Feb 27 08:55:50 AEST 1991


>>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, ... pipe ...

>In article <2171 at cs.rit.edu> dxl2585 at cs.rit.edu (Derek X Lee-Wo) writes:
>>When the child process is spawned, it inherits an identical set of file
>>descriptors as the parent. 

In article <1020 at uncw.UUCP> session at uncw.UUCP (Zack C. Sessions) writes:
>This actually is machine/compiler dependent. While true in UNIX, it
>is not necessarily true with all implementations of C. Not being
>familiar with ANSI C, maybe this is in ANSI C?

ANSI C (and indeed each other variation on C) has neither `processes'
nor `pipes' as a concept.  The fact that there happen to be functions
in your C library that implement both does not mean they are suitable
for comp.lang.c discussions (unless perhaps you want to propose
fork/join operations in a new variation on C).  (See, e.g., Mesa or Ada
language manuals for a description of fork/join.)

In other words, this whole topic is O/S dependent, and should move to
some O/S-specific newsgroup.
-- 
In-Real-Life: Chris Torek, Lawrence Berkeley Lab EE div (+1 415 486 5427)
Berkeley, CA		Domain:	torek at ee.lbl.gov



More information about the Comp.lang.c mailing list