admin管理员组文章数量:1355047
On openSUSE Leap 15.6 with XFS I've noticed that all processes get the 3 usual standard fds 0 1 and 2 plus one extra for inotify. For instance for this trivial exe
#include <unistd.h>
int main()
{
usleep(100000000L);
}
lsof shows (ignoring libs, cwd and the exe itself)
test 7212 paulf 0u CHR 136,2 0t0 5 /dev/pts/2
test 7212 paulf 1u CHR 136,2 0t0 5 /dev/pts/2
test 7212 paulf 2u CHR 136,2 0t0 5 /dev/pts/2
test 7212 paulf 44r a_inode 0,14 0 2074 inotify
This interferes with the Valgrind --track-fd regression tests.
Is there any way to turn this off?
本文标签: How to prevent new processes from inheriting an inotify fdStack Overflow
版权声明:本文标题:How to prevent new processes from inheriting an inotify fd? - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743984248a2571210.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论