title: what does "bash:no job control in this shell” mean?
body: <p>I think it's related to the parent process creating new subprocess and does not have tty. Can anyone explain the detail under the hood? i.e. the related working model of bash, process creation, etc?</p>
  
  <p>It may be a very broad topic so pointers to posts are also very appreciated. I've Googled for a while, all the results are about very specific case and none is about the story behind the scene. To provide more context, below is the shell script resulting the 'bash: no job control in this shell'.</p>
  
  <pre><code>#! /bin/bash
  
  while [ 1 ]; do
      st=$(netstat -an |grep 7070 |grep LISTEN -o | uniq)
      if [ -z $st ]; then
          echo "need to start proxy @$(date)"
          bash -i -c "ssh -D 7070 -N user@my-ssh.example.com &gt; /dev/null"
      else
          echo "proxy OK @$(date)"
      fi
      sleep 3
  done
  </code></pre>
  
  <p>This line:</p>
  
  <p><code>bash -i -c "ssh -D 7070 -N user@my-ssh.example.com &gt; /dev/null"</code></p>
  
  <p>is where "bash:no job control in this shell” come from.</p>