title: Why does my program hang when opening a mkfifo-ed pipe?
body: <p>I use mkfifo to create a named pipe.
  Then I use the following program to open it. However, the program hangs at the line "fopen". Is there something wrong here?</p>
  
  <pre><code>int main(int argc, char** argv) {
  char* line = "hello, world!";
  FILE* fp = fopen("/tmp/myFIFO", "rw");
  fprintf(fp, line);
  fclose(fp);
  return 0;
  }
  </code></pre>