title: what happens when multiple processes try to read from the same pipe?
body: <pre><code>#include &lt;unistd.h&gt;
  #include &lt;stdio.h&gt;
  int main()
  {
    char buff[100];
    int pfd[2];
    buff[0] = '\0';
    pipe(pfd);
    if (fork())
      write(pfd[1],"hello world", 12);
    fork();
    read(pfd[0], buff, 100);
    printf("%s\n", buff);
    printf("goodbye\n");
  }
  </code></pre>
  
  <p>I understand that only one process will write to the pipe, but what I don't understand is  could it be possible that one process reads from the pipe and reads only a part of the "hello world" and the other processes read the other parts of "hello world"?    </p>
  
  <p>In other words, what happens when a process tries to read a pipe while another process is reading it?</p>