title: Error: write EPIPE when piping node output to "| head"
body: <p>I'm having problems with getting the error:</p>
  
  <pre><code>events.js:48
          throw arguments[1]; // Unhandled 'error' event
                         ^
  Error: write EPIPE
      at errnoException (net.js:670:11)
      at Object.afterWrite [as oncomplete] (net.js:503:19)
  </code></pre>
  
  <p>when piping output to head. A simple case to try it out is:</p>
  
  <pre><code>console.log('some string');
  ... the same for 20 lines
  </code></pre>
  
  <p>and then <code>node test.js | head</code> to get the error, which seems to appear in about 70% runs on Ubuntu 12.04. What's the problem?</p>