inter process communication 
Author Message
 inter process communication

I 'm just wondering what solutions I could have to this problem
( must be workink on both linux and windows )

A master script ( A ) runs another wish scrip in the background ( B )
"exec wish scripb.tcl"
let's say that B is a print job an terminate when the job is finished ,
how could B send a message to A "Ok my job ' over and I'm leaving"
and maybe A send a message to B "I don't need you anymore you can leave"



Sun, 16 Mar 2003 03:00:00 GMT  
 inter process communication

Quote:

> I 'm just wondering what solutions I could have to this problem
> ( must be workink on both linux and windows )

> A master script ( A ) runs another wish scrip in the background ( B )
> "exec wish scripb.tcl"
> let's say that B is a print job an terminate when the job is finished ,
> how could B send a message to A "Ok my job ' over and I'm leaving"
> and maybe A send a message to B "I don't need you anymore you can leave"

You could use bgexec from the BLT extension.
To determine whether B is finished, you can put a trace on the status
variable. That is a global variable that you pass to bgexec
which will be set to the exit status of the B process.
To stop B from A, you can set the status variable to a certain
value. Note that this will kill process B.

It works on Unix and Windows platforms.

bgexec should really be in the TCL core. Any TCT members listening (well reading
that is)??? George ???

Ludwig

--


Senior Software Engineer        Frontier Design, Belgium
__________________________________________________________________



Sun, 16 Mar 2003 03:00:00 GMT  
 inter process communication



Quote:
> I 'm just wondering what solutions I could have to this problem
> ( must be workink on both linux and windows )
> A master script ( A ) runs another wish scrip in the background ( B )
> "exec wish scripb.tcl"
> let's say that B is a print job an terminate when the job is finished
> how could B send a message to A "Ok my job ' over and I'm leaving"
> and maybe A send a message to B "I don't need you anymore you can

leave"

Use the 'open "|myscript"' command to open a bidirectionnal pipe
between A and B.

Take a look at the man page of open.

Jo?l Saunier

Sent via Deja.com http://www.deja.com/
Before you buy.



Sun, 16 Mar 2003 03:00:00 GMT  
 inter process communication
seems good to me , does anybody know where I could find sample code
    Thanks
        Patrick
Quote:
> Use the 'open "|myscript"' command to open a bidirectionnal pipe
> between A and B.

> Take a look at the man page of open.

> Jo?l Saunier



Sun, 16 Mar 2003 03:00:00 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Inter process communication using Tk/send hangs on suspended processes

2. VSE 3.11 and Inter-process communication

3. Smalltalk-to-Smalltalk inter-process communication

4. Inter-Process Communication

5. Inter-process communication

6. Inter-process communication options

7. Asynchronous Inter Process Communication in a Prolog debugger

8. Inter-process communication

9. Inter Process Communication with python

10. portable Inter Process Communication

11. inter-process communication

12. HELP! Inter Process Communication

 

 
Powered by phpBB® Forum Software