我做了一个谷歌搜索关于“匿名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.