Skip to content

Instantly share code, notes, and snippets.

@buxtonpaul
Created June 19, 2017 13:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save buxtonpaul/56bbfd1c777fe43789aef46b57f1db64 to your computer and use it in GitHub Desktop.
Save buxtonpaul/56bbfd1c777fe43789aef46b57f1db64 to your computer and use it in GitHub Desktop.
Sample producer for mknod ipc
#include <stdio.h>
#include <unistd.h>
int main(int argc,char*argv)
{
FILE *fp;
int i;
fp=fopen("myfifo.txt","w");
for (i = 0;i<10;i++)
{
fprintf(fp,"Hello %d\n",i);
fflush(fp);
sleep(1);
}
fclose(fp);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment