title: Pass variable from a child to parent in KSH
body: <p>I have to work with KSH (yeah that hell shell).
  I need to use a fork, a subroutine as following:</p>
  
  <pre><code>    #!/bin/ksh
  
      PIPE=PIPE_$$
      PIPE_ERR=PIPE_ERR_$$
  
      export TEST_FILS
  
      $(. ./LanceFils.ksh 2&gt;${PIPE_ERR} 1&gt;${PIPE}) &amp;
      PID_CHILD=$!
      echo "Nom du fichier PIPE: ${PIPE}"
      echo "Processus fils : " $!
      wait ${PID_CHILD}
  
      echo "Code retour: " $?
      echo "Sortie standard de PROC_FILS : " $(cat ${PIPE})
      echo "Sortie d'erreur(s) de PROC_FILS : " $(cat ${PIPE_ERR})
  
      echo "Contenu de TEST_FILS: ${TEST_FILS}"
      rm -rf ${PIPE}
  </code></pre>
  
  <p>Content of LanceFils.ksh</p>
  
  <pre><code>    #!/bin/ksh
  
      TIMEOUT=5
  
      export TEST_FILS
  
      echo "Je suis le script fils et j'attends ${TIMEOUT} secondes" 
      echo "Nom du pipe du pere ${PIPE}"
      sleep ${TIMEOUT}
  
      TEST_FILS="Je suis le fils"
      echo "Salut c'était bien !!!"
      exit 10
  </code></pre>
  
  <p>I know this do not work, btw i try to find a way to make it works ...
  In my code you can see i want share TEST_FILS variable between child and parent.
  There is way in KSH to share a variable, as in perl by using "share" or if i have to use a pipe like in C ?</p>
  
  <p>Thank you.</p>