On Nov 17, 10:07 am, Beagle <beagle...@hotmail.com> wrote:
> Whoops, did "not" say what my question was... I basically want to start a
> background process that doesn't inherit any of the open file
> descriptors of the parent. Is there a way to do that?
After fork, in the child, iterating thru the list of open fds and
closing them worked.
int pid = fork()
if (pid == 0) {
....
for (int i = 0; i < OPEN_FDS; i++)
close(i);
execl(..);
....
}
>
> On Nov 17, 9:45 am, Beagle <beagle...@hotmail.com> wrote:
>
> > Folks,
>
> > The server pid accepts network connections until the 'host' connection
> > exits, then all clients exit (e.g. all sockets are closed). A special
> > case is a recorder shell based client that starts after the first
> > client connects, but when the host exits, it waits for the shell to
> > exit before closing the rest of the connections, even though I see in
> > the logs the server closes all connections.
|