Inter process communication using Tk/send hangs on suspended processes

Greg McFarlane gregm at iname.com
Tue Feb 22 08:10:05 EST 2000


On 18 Feb, Rob W. W. Hooft wrote:
> >>>>> "GM" == Greg McFarlane <gregm at iname.com> writes:
>  GM> On 15 Feb, Rob W. W. Hooft wrote:
>  >> I have a group of python programs. Whenever any new program is
>  >> started, it will try to establish connections to each of the other
>  >> ones using Tk/send (it is asking each for their background color,
>  >> and will choose a new one for itself). 
> 
>  GM> The only things I can think of are to fork separate processes to
>  GM> do each send and kill them if they do not respond quickly. 
> 
> That doesn't work, as this will result in X requests that arrive
> out-of-order. As far as I know, no 2 processes can share their X
> socket connection. I guess I'll have to investigate the "server"
> concept.

That is only true if you fork without exec'ing and are not careful
about closing the inherited file descriptors.  What I meant was to
fork *and exec* another process, passing in information like the X
display using the command line arguments.

-- 
Greg McFarlane     INMS Telstra Australia     gregm at iname.com




More information about the Python-list mailing list