title: getting exit code of an executed sipp with tcl
body: <p>I'm trying to get the exit code " echo $? " after executing SIPp command with exec from tcl :</p>
  
  <pre><code>if { [catch { exec /usr/local/sipp-3.3.990/sipp -t "u1" -s $SERVICE \
                                  -ap $PASSWORD \
                              -sf $SCRIPT_PATH1 \
                              -i $LOCAL_IP \
                              -m 1 -key path $str \
                              -key dnid *20 \
                              -timeout 10s\
                              -trace_err -trace_screen $CLIENT2 -nd | /bin/sh $str/return_code.sh } fid option] }
  </code></pre>
  
  <p>I have tried to do execute "echo $?" but that didn’t work so I tried to execute it from an other script called "return_code.sh" </p>
  
  <pre><code>  #!/bin/sh
  echo "exit code: $?"
  echo "PPID: $PPID"
  </code></pre>
  
  <p>but this also didn't work the result is always 0 , any idea about how to get the exit code from tcl ? </p>
  
  <p>Best regards ,</p>