title: How to make a fifo in C?
body: <p>I have to use <code>mkfifo</code> in my C program in Ubuntu. But I have an error when I compile: <code>no such file or directory</code> .</p>
  
  <p>I think the problem because I have not set the <code>panel_fifo</code> environment variables. But I don't khow how could I do this.</p>
  
  <p>Here is my code I use to test this method:</p>
  
  <pre><code>char *myfifo="./sock/myfifo";
  
  if (mkfifo(myfifo,0777)&lt;0)
  perror("can't make it");
  
  if (fd=open(myfifo,O_WRONLY)&lt;0)
   perror("can't open it");
  </code></pre>
  
  <p>I compile this with:</p>
  
  <p><code>gcc gh.c -o gh</code></p>
  
  <p>When I run, I get this error message:</p>
  
  <pre><code>can't make it:no such file or directory
  can't open it:no such file or directory
  </code></pre>