我有这个代码:
mkfifo ("bPipe", 0660); /* Create named pipe */
int fd1 = open ("bPipe", O_WRONLY|O_NONBLOCK); /* Open named pipe for writing */
perror("FD1");
int fd = open ("bPipe", O_RDONLY|O_NONBLOCK); /* Open it for reading */
perror("FD");
char*mex="Hello world\n\0";
write (fd1,mex , getStringLenght(mex)+1);
char* result = readline(fd1);
printf("Rc %s : \n",result);
Run Code Online (Sandbox Code Playgroud)
我正在研究C中的FIFO,我试图创建两个FIFO,但在打开它之后我得到了这两个错误:
FD1:Device not configured
FD:Device not configured
Run Code Online (Sandbox Code Playgroud)
而且我不明白为什么.
PS"readLine"和"getStringLenght"是我的功能