How to code proc to background process? 
Author Message
 How to code proc to background process?

Dear all,
How to code proc to background process? or yor have another
way to run  tcp script in background process.
Thanks for advance.

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



Fri, 07 Mar 2003 14:05:16 GMT  
 How to code proc to background process?

Quote:

> Dear all,
> How to code proc to background process? or yor have another
> way to run  tcp script in background process.
> Thanks for advance.

You can't make a proc run in the background, but there are other things
you can do that have the same effect.

1.  Put your proc in a separate script, and run it with the [exec]
command.  Don't forget the trailing "&" to make it run in the
background.

2.  Put your proc in a separate script, and run it with the [open |]
command.  Set up a fileevent handler so you are notified when the script
generates output. See
http://purl.org/thecliff/tcl/wiki/ConceptsOfArchitecturalDesignForTcl...

Bob
--

Mayo Foundation                                           (507) 284-2702
Rochester MN, 55905 USA   http://www.mayo.edu/sppdg/sppdg_home_page.html



Fri, 07 Mar 2003 03:00:00 GMT  
 How to code proc to background process?

Quote:
> Dear all,
> How to code proc to background process? or yor have another
> way to run  tcp script in background process.
> Thanks for advance.

If it's a complete script, you can do something like

exec youscript.tcl &

If you mean part of your script, it'll need more gymnastics.

L

--
MY EMAIL ADDRESS HAS CHANGED --> UPDATE YOUR ADDRESSBOOK

Laurent Duperval                 "Montreal winters are an intelligence test,
                                         and we who are here have failed it."

Penguin Power!         ***Nothing I say reflects the views of my employer***



Fri, 07 Mar 2003 03:00:00 GMT  
 How to code proc to background process?
If you need to run a proc in the "background" (i.e. within your current
event loop) use the after command to schedule it using the very well behaved
TCL event scheduler:

e.g.

proc afterCommand {time} {
  #do something useful
  after $time afterCommand $time

Quote:
}

You can start the process off like:
afterCommand 1000

Then every second it will perform whatever task you desire then re-schedule
itself.

Tom


Quote:
> Dear all,
> How to code proc to background process? or yor have another
> way to run  tcp script in background process.
> Thanks for advance.

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



Sat, 08 Mar 2003 08:57:41 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. Example Code for Proc Processing

2. HOWTO: child proc in background ?

3. Proc in the background?

4. Run a proc in the background?

5. Proc Processing

6. VAST and MQ: Background process consumes all responses

7. Background process

8. Background processes

9. Background Process hoarding cycles

10. How to make Clarion process executing in background?

11. Background Processing

12. Background processing.

 

 
Powered by phpBB® Forum Software