write端:
#include <stdio.h>
#include <unistd.h>
#include <fcntl.h>
#include <sys/types.h>
#include <string.h>
int main(int argc, const char *argv[])
{
if(access("./myfifo",F_OK) < 0)
{
if(mkfifo("./myfifo",0644) < 0)
{
perror("mkfifo fail\n");
return -1;
}
}
int fd;
char buff[128] = "\0";
fd =