title: What's the significance of specifying a file mode when reopening STDOUT to /dev/null?
body: <p>I'm reading an example ruby script that creates a daemon by forking, creating a new session, forking again, then redirecting stdin, stdout, stderr to /dev/null</p>
  
  <p>Here's a snippet of the redirection:</p>
  
  <pre><code>STDIN.reopen '/dev/null'
  STDOUT.reopen '/dev/null', 'a'
  STDERR.reopen '/dev/null', 'a'
  </code></pre>
  
  <p>What's the significance of specifying the file mode (<code>'a'</code>) in this case? Would the behavior be any different, for example, with</p>
  
  <pre><code>STDOUT.reopen '/dev/null', 'w'
  </code></pre>
  
  <p>or even</p>
  
  <pre><code>STDOUT.reopen '/dev/null'
  </code></pre>
  
  <p>?</p>