运行到open()函数卡住,怎么办?
代码如下:
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <limits.h>
#include <unistd.h>
#include <fcntl.h>
int main()
{
int fd;
if((fd = open("fifo1",O_WRONLY)) < 0) {
perror("打开失败。");
exit(1);
}
printf("%d",fd);
write(fd,"nihao",6);
close(fd);
return 0;
}
路径是正确的,但是控制台没有任何输出。谷歌又跳不了页面,真急死俺啦。。。。