Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!um-math!sharkey!shadooby!eecae!tank!uxc!csd4.milw.wisc.edu!leah!rpi!rpi.edu!deven From: deven@pawl.rpi.edu (Deven Corzine) Newsgroups: comp.sys.amiga.tech Subject: Re: Unix V7 functionality under (or along with) AmigaDOS? (*LONG*) Message-ID: Date: 31 Mar 89 08:01:09 GMT References: <6275@cbmvax.UUCP> <0776.AA0776@julie> <0856.AA0856@julie> <6420@cbmvax.UUCP> <6465@cbmvax.UUCP> Sender: usenet@rpi.edu Organization: RPI Public Access Workstation Lab, Troy NY Lines: 29 In-reply-to: jesup@cbmvax.UUCP's message of 30 Mar 89 22:23:13 GMT In article <6465@cbmvax.UUCP> jesup@cbmvax.UUCP (Randell Jesup) writes: In article shadow@pawl.rpi.edu (Deven T. Corzine) writes: >>> Within limits stated before: BCPL programs can't share >>>filehandles. NEVER Close() the result of Output(). Don't pass it off >>>and exit, wait until the other process is done with it. >>Well, you COULD have the child Close(Output()), if the parent and >>child agree the child is to do so, but it is definitely a poor >>programming style, and hence very strongly discouraged... but legal. > No. The definition of a process is that CIS and COS (aka >Input() and Output()) will remain valid (the owning CLI or WB closes >them). You should never Close the result of Input() or Output(). >NEVER. It IS illegal. True, given that definition, it IS illegal. I retract that statement. More appropriately, I meant that a passed file handle could be closed legally by the child process. I hadn't considered that closing Input() and Output() is illegal, but of course it would have to be. Even so, you could legitimately pass a separate file handle (perhaps in an Exec message as suggested) to a child process which would close it. THAT is legal, is it not? Deven -- ------- shadow@pawl.rpi.edu ------- Deven Thomas Corzine --------------------- Cogito shadow@acm.rpi.edu 2346 15th Street Pi-Rho America ergo userfxb6@rpitsmts.bitnet Troy, NY 12180-2306 (518) 272-5847 sum... In the immortal words of Socrates: "I drank what?" ...I think.