title: Set pipe buffer size
body: <p>I have a C++ multithreaded application which uses posix pipes in order to perform inter thread communications efficiently (so I don't have to get crazy with deadlocks).</p>
  
  <p>I've set the write operation non-blocking, so the writer will get an error if there is not enough space in the buffer to write.</p>
  
  <pre><code>if((pipe(pipe_des)) == -1)
      throw PipeException();
  
  int flags = fcntl(pipe_des[1], F_GETFL, 0); // set write operation non-blocking
  assert(flags != -1);
  fcntl(pipe_des[1], F_SETFL, flags | O_NONBLOCK);
  </code></pre>
  
  <p>Now I'd wish to set the pipe buffer size to a custom value (one word in the specific case).</p>
  
  <p>I've googled for it but I was not able to find anything useful. Is there a way (possibly posix compliant) to do it?</p>
  
  <p>Thanks</p>
  
  <p>Lorenzo</p>
  
  <p>PS: I'm under linux (if it may be useful)</p>