Ransom Briggs asked:
> I'm working on a threaded perl program whose function is basically
> made 
> up of one master thread and multiple worker threads which are fed 
> commands to run.  The problem that I'm having conceptually is if I
> can 
> safely use the variable $?, is this defined per thread or per
> process?  
> ie:  if I have multiple commands running at the same time would it be
> possible for the following interaction to happen?  thread1 runs a 
> command which writes 0 to $?, thread2 runs a command which writes 1
> to 
> $?, then thread1 and thread2 both read $? and see a 1.

$? is not shared between threads.  What you want to do will work fine.


 
____________________________________________________________________________________
Any questions? Get answers on any topic at www.Answers.yahoo.com.  Try it now.

Reply via email to