linux – 什么是匿名的inode?

linux – 什么是匿名的inode?,第1张

概述我做了一个谷歌搜索关于“匿名inode”,它似乎与epoll相关…但实际上是什么? 至少在某些上下文中,匿名inode是没有附加目录条目的inode.创建这样一个inode的最简单方法就是这样: int fd = open( "/tmp/file", O_CREAT | O_RDWR, 0666 );unlink( "/tmp/file" );// Note that the descript 我做了一个谷歌搜索关于“匿名inode”,它似乎与epoll相关…但实际上是什么?解决方法 至少在某些上下文中,匿名inode是没有附加目录条目的inode.创建这样一个inode的最简单方法就是这样:
int fd = open( "/tmp/file",O_CREAT | O_RDWR,0666 );unlink( "/tmp/file" );// Note that the descriptor fd Now points to an inode that has no filesystem entry; you// can still write to it,fstat() it,etc. but you can't find it in the filesystem.
总结

以上是内存溢出为你收集整理的linux – 什么是匿名的inode?全部内容,希望文章能够帮你解决linux – 什么是匿名的inode?所遇到的程序开发问题。

如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。

欢迎分享,转载请注明来源:内存溢出

原文地址: https://outofmemory.cn/yw/1043225.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2022-05-24
下一篇 2022-05-24

发表评论

登录后才能评论

评论列表(0条)

保存