F_GETPIPE_SZ returns -1 in C
<p>Why would F_GETPIPE_SZ return -1? It sounds like an error, but I can't find any mention of what error it is, or, more importantly, what I'm supposed to do to not get the error.</p>

<p>I'm running Raspbian on a Raspberry Pi, for what it's worth. I haven't tried the code on my desktop Debian yet. As far as I can tell, I'm following the textbook F_GETPIPE_SZ example. Am I missing something?</p>

<pre><code>#define _GNU_SOURCE
#include &lt;stdio.h&gt;
#include &lt;fcntl.h&gt;
#include &lt;sys/stat.h&gt;
#include &lt;unistd.h&gt;

int main(int argc, char **argv)
{
  int fd, pipesize;
  fd = mkfifo("/tmp/audio-fifo",0666);
  //  fcntl(fd, F_SETPIPE_SZ, 4096);
  pipesize = fcntl(fd, F_GETPIPE_SZ);
  printf("Pipe size: %d\n", pipesize);
  return 0;
}
</code></pre>