Path: utzoo!yunexus!geac!syntron!jtsv16!uunet!auspex!guy From: guy@auspex.UUCP (Guy Harris) Newsgroups: comp.unix.questions Subject: Re: Child access to parent files opened AFTER fork/exec. Message-ID: <347@auspex.UUCP> Date: 29 Oct 88 03:55:15 GMT Article-I.D.: auspex.347 References: <351@marob.MASA.COM> Reply-To: guy@auspex.UUCP (Guy Harris) Organization: Auspex Systems, Santa Clara Lines: 12 >Given that a child process inherits the open files of its parent, >is there any way for the child to access a file opened by the >parent subsequent to the child being exec'd ? Yes. It can reopen those files itself, assuming the files have a file name, it knows the file name, and opening something with that name gives it a descriptor for the same file (which needn't be true if the file is a special file that refers to a "clone" device). Alternatively, some UNIX IPC mechanisms, namely UNIX-domain sockets in 4.[23]BSD and "stream pipes" in System V Release 3.x, permit a process to pass file descriptors to another process.