Child access to parent files opened AFTER fork/exec.
Dave Hammond
daveh at marob.MASA.COM
Fri Oct 28 03:22:31 AEST 1988
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 ?
As an example, the parent forks a subprocess who's task is to present
data (from files or pipelines) generated by the parent. For each new
data stream, the parent and child exchange messages concerning the
origination of the data, the results of the presentation session, etc.
Because the child is exec'd only once, it must open and manage each file
or pipeline in question. It would be beneficial to divorce the child from
the file/pipeline management tasks and allow it to simply regard its input as
stream data to be presented. However, forking a new child for each new data
stream (just to inherit a file descriptor) is undesireable, as it would cause
a noticeable delay each time the child is invoked.
Dave Hammond
UUCP: ...!uunet!masa.com!{marob,dsix2}!daveh
DOMAIN: daveh at marob.masa.com
----------------------------------------------------------------------------
More information about the Comp.unix.questions
mailing list