我在Google上搜索了有关“匿名inode”的信息,看来它与epoll有关……但是实际上是什么呢?
至少在某些情况下,匿名索引节点是没有附加目录条目的索引节点。创建此类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.