title: How to distinguish calling a c library function from making a system call?
body: <p>There is the C library function <a href="https://linux.die.net/man/3/pipe" rel="nofollow noreferrer">pipe(3)</a> and the kernel (system call) <a href="https://linux.die.net/man/2/pipe" rel="nofollow noreferrer">pipe(2)</a>.
  Both have the same signature and should be used like this (same include header):</p>
  <pre><code>#include &lt;unistd.h&gt;
  int fds[2];
  pipe(fds);
  </code></pre>
  <p>Will this code call pipe(3) or pipe(2)?
  How can I decide whether I want to use libc or a system call?
  If pipe(3) and pipe(2) are the same, how do I know that?</p>