title: Bash non blocking source (background???)
body: <p>im trying to get a bash to pass argument to another bash, I manged to do this by sourcing one of the and calling it from the other so they would be parent and child under the same shell. the problem is that the child is a loop becuase im traying to catch events (it might be reading a fifo(pipefile)) and this blocked the bash... right, so i tought hmmm let's try running the bash on the back ground and the problem i get here i guess is that the variables dont come int becuase i guess it is not under the same shell i tried sourcing and backgounding that but no possitive results...</p>
  
  <p>also at some point with testing my shell starts going crazy when i send to fifo(pipe file) even if nothing (that i know is reading) it acts as if something had read that fifo, and some of my other bash screens start doing crazy stuff... :O</p>
  
  <p>anyway was wondering if anyone can help me. Dont know if what im trying to do is even possible... Thanks.</p>
  
  <p>DOnt know where i read (haven been able to find the page again, yet) that moveing script to the background makes it accesible to parent and child, subprocess and its the papas mamas, but that's not my experience up to now.</p>
  
  <p><strong>bash1</strong></p>
  
  <pre><code>   #!/bin/bash
  
      while true
      do
  
      . ./bash2.sh &amp;
  
      if [[ $VARIABLE = 1 ]]; then
      echo "message recevied"
      fi
  </code></pre>
  
  <p><strong>bash2</strong></p>
  
  <pre><code>  #!/bin/bash
  
      while true
      do
  
      if [[ $(cat ./fifo1) = 0 ]]; then
      VARIABLE=1
      fi
      done
  </code></pre>
  
  <p>Thanks</p>