为什么删除FIFO后两个进程仍可以使用FIFO进行通信? [英] why two processes can still use a FIFO to communicate after the FIFO been deleted?

查看:101
本文介绍了为什么删除FIFO后两个进程仍可以使用FIFO进行通信?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经使用 mkfifo 命令制作了一个FIFO,并创建了两个进程来使用FIFO进行通信.但是我发现,虽然使用FIFO的进程删除了FIFO,而且两个进程甚至可以使用不存在的FIFO来发送数据,为什么?

I've made a FIFO using the mkfifo command,and created two processes to use the FIFO to communicate.But I've found that while the processes using the FIFO,I removed the FIFO,and the two processes can still even use the non-existed FIFO to send data,why?

推荐答案

该对象已从文件系统中删除,但是与所有其他文件一样,该对象将继续存在,直到关闭其上的所有打开的文件描述符为止.

The object has been removed from the filesystem, but just as with all other files it will continue to exist until all open file descriptors on/from it are closed.

这篇关于为什么删除FIFO后两个进程仍可以使用FIFO进行通信?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆