Passing socket objects over execution

I-feng Kao - EECS (ikao@gandalf.eecs.wsu.edu)
Wed, 3 Aug 1994 23:56:11 GMT

I am working on interprocess communication(IPC) in python. In the program
I have, I dynamically bind a port, then fork a child so the child process knons
about the hostname and port number. I pass the information with parameters
and the parent process listening for connection for the program that child
process executes. As you may know, when a socket object is listening for a
connection, it stops and waits for ever until connection comes in. However,
this is what I want exectly. Later I worked out two passible solutions which
requires some special techniques:

1. Make the connection before fork(), and pass the socket object over program
execution(for example, os.execlp()). I do not really know if I can do this
or not.

2. Use idle detections with some signal function. This is still not possible
at this time, I have to wait for python 1.0.4 or 1.1, according to Gwido

I am running out of energy at this time. If anyone has a better idea or
solution to passing socket objects, please help me out.

ANY responses, possible solutions, and ideas are WELCOME.

--
+--------------------------------------------------------------------+
|   I-feng Kao         	  E-mail : ikao@eecs.wsu.edu                 |
|                                  i8974949@wsuaix.csc.wsu.edu       |
|                                  kao@wsuvm1.csc.wsu.edu            |