ChinaUnix.net
相关文章推荐:

linux mkfifo函数

不好意思,虽然不是初学者。但水平一直很菜。 在看fifo函数的时候,编写了个小程序,但总达不到我想要的结果。又找不到问题所在。 只有在此求教各位,望不吝赐教。非常感谢。 #include #include #include #include #include #include #include #define ERR_EXIT(m)\ do{\ perror(m);\ exit(-1);\ }whil...

by hstking - Linux环境编程 - 2012-09-12 18:14:02 阅读(3120) 回复(5)

相关讨论

mkfifo(建立实名管道) 相关函数 pipe,popen,open,umask 表头文件 #include#include 定义函数 int mkfifo(const char * pathname,mode_t mode); 函数说明 mkfifo() 会依参数pathname建立特殊的FIFO文件,该文件必须不存在,而参数mode为该文件的权限(mode%~umask),因此 umask值也会影响到FIFO文件的权限。mkfifo()建立的FIFO文件其他进程都可以用读写一般文件的方式存取。当使用open()来打开 FIFO文件时,O_NONB...

by jluliuchao - Linux文档专区 - 2009-11-11 16:17:41 阅读(827) 回复(0)

本帖最后由 wy200747055 于 2012-06-11 09:48 编辑 int mkfifo(const char *filename,mode_t mode); 这个函数创建有名管道,filename是要创建的有名管道文件,请问mode是什么模式?都有哪些模式?各个模式都是什么意思? mkfifo(FIFO,O_CREAT|O_EXCL)里面O_CREAT和O_EXCL是什么模式,都代表什么意思啊?还有没有别的什么模式?

by wy200747055 - Linux环境编程 - 2012-06-11 09:47:54 阅读(4601) 回复(2)

[code] int mk; mk = mkfifo("my_fifo", 0777); if (mk == -1) { perror("mkfifo"); return -1; } [/code]为什么会显示mkfifo: Operation not permitted,没有权限,怎么改?刚刚开始学linux,多指教

by cocat00 - C/C++ - 2010-06-03 12:11:00 阅读(3580) 回复(2)

使用mkfifo函数如何控制队列的长度为1,或者如何清空 [ 本帖最后由 gaigai 于 2009-10-22 14:00 编辑 ]

by gaigai - C/C++ - 2009-10-22 13:49:31 阅读(1345) 回复(0)

第一个程序: //filename:peter.c #include #include #include #include #include #include #include int main(void) { char write_fifo_name[] = "read-fifo"; char read_fifo_name[] = "write-fifo"; int write_fd = 0; int read_fd = 0; char buf[256] = { "\0"}; int len = 0; int ret = mkfifo(write_fifo_name,S_IRUSR | S_IWUSR ...

by zhanglupanda - C/C++ - 2007-07-23 13:36:14 阅读(3410) 回复(7)

出错提示:Operation not permitted mode_t 设置为0666 umask为 0022 我是以root的身份登录的,不知道是什么原因造成的哦,应该怎么解决呢?

by cq1985719 - Linux环境编程 - 2008-12-22 21:35:02 阅读(1694) 回复(1)

请问使用mkfifo()函数的程序在编译的时候需要链接什么动态链接库呢? 症状: /tmp/ccKkokrb.o: In function `main': 4_16.c:(.text+0x21): undefined reference to `mkfilo' collect2: ld returned 1 exit status

by xiaozhu2007 - C/C++ - 2007-11-02 21:52:46 阅读(1837) 回复(2)

mkfifo时出错,errno=2 perror打印的信息为 Interrupted system call 能不能解释一下是什么原因?

by daniel_kohler - C/C++ - 2010-05-07 17:56:01 阅读(1791) 回复(1)

(1)if(mkfifo("a1.text",O_CREAT|0666)<0) perror("mkfifo error"); (2)if(mkfifo("a2.text", 0666)<0) perror("mkfifo error"); 这两个有什么区别啊 都是创建有名管道!喃

by militala - Linux环境编程 - 2008-01-04 09:05:40 阅读(1903) 回复(2)

请问mkfifo指令的目的及用法, 谢谢!

by efenyue - Solaris - 2004-03-17 18:51:16 阅读(1284) 回复(0)