我在 google 上搜索了“anonymous 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 - 什么是 Linux 中的匿名 inode?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4508998/