title: TCL: run proc with new process from same file
body: <p>I'm trying to run proc with new process
  I'm trying to call proc1 and proc2 from main function , but each should run separately with a new process (or subprocess) and also wait till it finish</p>
  
  <pre><code>    proc main { var } {
          puts "main function with var: $var"
          #call proc1 with new process
          exec proc1 1
          #wait till proc1 finish
          #call proc2 with new process
          exec proc2 2
          #wait till proc2 finish
          puts "Finished"
      }
  
      proc proc1 { var1 } {
          puts "proc1 function with var: $var1"
      }
  
      proc proc2 { var2 } {
          puts "proc2 function with var: $var2"
      }
  </code></pre>
  
  <p>I tried using exec but it did not work 
  I tried googling it, but did not succeed to find a solution</p>
  
  <p>How can I make it run ?</p>
  
  <p>Thanks a lot!</p>