socket and subprocess problem
prologic at shortcircuit.net.au
Tue Dec 16 07:03:55 CET 2008
On Tue, Dec 16, 2008 at 3:30 PM, <goatold at gmail.com> wrote:
> Guys thanks to point it out.
> Yes, it's a race problem. I tried sleep long enough, then I can
> connect to the socket. I should add code to try to connect to the
> socket for a given time out.
This is where event-driven approaches
become really useful :)
#1. When my subprocess process has successfully
started notify the parent.
#2. When my subprocess process has successfully
created a listening socket, notify the parent.
#1. When our subprocess process has
successfully started a listening socket
initiate a connection.
I could implement a prototype of this
if the OP is interested.
More information about the Python-list