ChinaUnix.net
相关文章推荐:

mkfifo

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

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

相关讨论

$ uname -a Linux lww 2.6.30-1-686 #1 SMP Sat Aug 15 19:11:58 UTC 2009 i686 GNU/Linux $ perl -MPOSIX -wle 'mkfifo("/tmp/fifo", 0777)' $ ls -l /tmp/fifo prwxr-x--- 1 hs hs 0 2009-10-08 16:41 /tmp/fifo 其它用户的不能有任何权限,组用户不能有写的权限?

by hotsnow - Perl - 2009-10-08 20:32:58 阅读(1558) 回复(4)

我希望使用mkfifo进行多线程的通信,但实际的运行结果不对,表现为 1,有的发送的字符,没有接受到 下面是程序,请高手帮忙 //文件名fifo。c,服务器端 include #include #include #include #include #define FIFO_CREATE_MODE 0666 #define FIFO_WRITE_MODE (O_APPEND | O_WRONLY) #define FIFO_READ_MODE (O_RDONLY) #define FIFO_PATH_LEN 30 #define REA...

by double0808 - C/C++ - 2007-10-12 22:48:05 阅读(2183) 回复(2)

写了一个mkfifo程序,总是出现莫明其妙的问题,现在贴出来,请大家帮指点一下。 这是write 函数 int main(int argc, char **argv) { int r_value = 0; ix_uint32 i_rbyte = 0; ix_uint8 i_type = 0; ix_uint8 r_log_buf[2048] = {0}; ix_uint8 r_dbg_buf[2048] = {0}; ix_uint8 fd = 0; ix_uint8 i_count = 0; ix_uint32 read_wbyte = 0; ix_uint8 i_stat = 0; if (argc < 4) { fprintf(stderr, "the ...

by nebula2005 - C/C++ - 2008-04-24 11:22:03 阅读(2111) 回复(3)

mknod ,mkfifo 有何区别, 还有就是mknod的主要作用是什么?在建立设备文件,还有什么? 在建立设备文件时,主设备,次设备怎么确定?能给个详细的例子吗?谢谢

by gaigai - 系统管理 - 2006-08-04 00:57:56 阅读(729) 回复(1)

环境:RedHat Enterprise Linux AS 4 服务端代码如下(svr.c): #include #include #include #include #include #include #include #define TMOUT_SEC 5 int mkfifo_by_proc() {     int fd;     char name[44];     sprintf( name,"myfifo", getenv( "HOME" ) );  &nbs...

by legone2008 - C/C++ - 2009-05-14 16:00:38 阅读(817) 回复(3)

我在mkfifo后调用open,程序死在open上了。迷惘啊!敬请高人点拨。谢谢! system ("mkdir /user/abc123/test 2>/dev/null"); unlink (("/user/abc123/test/test1.pipe"); mkfifo ("/user/abc123/test/test1.pipe",(S_IRWXU|S_IRWXG|S_IRWXO); open ("/user/abc123/test/test1.pipe",O_RDONLY);

by user_abc - Solaris - 2006-06-16 09:30:53 阅读(863) 回复(0)

在ubuntu/或者其他linux下运行,script screen.log,记录屏幕信息到screen.log里,一直记录到你exit为止,记录屏幕log的好方法... [code]root@ubuntu2:/# script screen.log Script started, file is screen.log root@ubuntu2:/# ls -ltr total 76 drwxr-xr-x 2 root root 4096 Jun 13 22:14 mnt drwx------ 2 root root 16384 Sep 10 10:08 lost+found lrwxrwxrwx 1 root root 11 Sep 10 10:08 cdrom -> media/cdrom drwxr-xr...

by star33375249 - Shell - 2011-12-17 19:53:50 阅读(2735) 回复(9)

写了个简单的测试源码如下: #include #include #include int main(int argc, char **argv) { char nm[]="/home/abcdefg"; mkfifo(nm, S_IRUSR|S_IWUSR|S_IROTH|S_IWOTH|S_IRGRP|S_IWGRP); int rfp; int wfp; int len; if (fork() > 0) { wfp = open(nm, O_WRONLY); char *buf = NULL; buf = new char[30]; ...

by chinaljj - C/C++ - 2007-04-17 11:09:51 阅读(1702) 回复(2)

如何使用mkfifo,它的功能是什么?

by zpr9871 - Shell - 2004-02-29 22:04:04 阅读(2166) 回复(6)

第一个程序: //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 阅读(2725) 回复(7)