Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!portal!cup.portal.com!DeadHead From: DeadHead@cup.portal.com (Bruce M Ong) Newsgroups: comp.unix.programmer Subject: Passing open file descriptor to the exec'ed process Message-ID: <34954@cup.portal.com> Date: 17 Oct 90 20:46:09 GMT Distribution: na Organization: The Portal System (TM) Lines: 22 Hi - I have a question w/ regard to passing open file descriptors from a parent to a child that's spawned with 'exec' not 'fork'. Basically, how to do it right? I have a parent process that makes a socket connection with a remote server. And depending on a server reply message type, I want the parent process to exec another program (the parent process will go away, with the new program replacing it). However, i dont want to close the connection and open the connection again from the new program - I want the new program to inherite the open socket descriptor and continue to talk to the server, without the server knowing that the client has gone through a metamorphosis. Any hints or where can I find some source example, (does the BSD inetd do something like this?) would be much appreciated. thanks - bruce deadhead@cup.portal.com