/* Opens a named pipe for reading and reads int values
   from it (unsynchronized).
   Written by Andre M. Maier, dhbw@andre-maier.com */
#include <fcntl.h>
#include <stdio.h>
#include <unistd.h>
int main(int argc, char** argv)
{
   char* named_pipe="/tmp/mypipe";
   while(1)
   {
      int fd=open(named_pipe,O_RDONLY);
      char str[80];
      read(fd,str,80);
      printf("%s",str);
      close(fd);
   }
   return 0;
}

