title: Detecting if a shell redirect command runs out of diskspace?
body: <p>I need to do a </p>
  
  <pre><code>sort big-file | uniq &gt; big-file.temp
  </code></pre>
  
  <p>called from a C program via system. 
  Does this report an error when the file system gets full?</p>
  
  <p>A man 2 "write" only returns 0 if it can't write all the data, but /dev/null always returns 0 and the bash is not reporting an error when piping into it, so i guess i will not receive an error notification.</p>