title: bash: silently kill background function process
body: <p>shell gurus,</p>
  
  <p>I have a bash shell script, in which I launch a background function, say <code>foo()</code>, to display a progress bar for a boring and long command:</p>
  
  <pre><code>foo()
  {
      while [ 1 ]
      do
          #massively cool progress bar display code
          sleep 1
      done
  }
  
  foo &amp;
  foo_pid=$!
  
  boring_and_long_command
  kill $foo_pid &gt;/dev/null 2&gt;&amp;1
  sleep 10
  </code></pre>
  
  <p>now, when <code>foo</code> dies, I see the following text:</p>
  
  <pre><code>/home/user/script: line XXX: 30290 Killed                  foo
  </code></pre>
  
  <p>This totally destroys the awesomeness of my, otherwise massively cool, progress bar display.</p>
  
  <p>How do I get rid of this message?</p>