Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libinotify open() considerations #10

Closed
grayed opened this issue Aug 5, 2014 · 5 comments
Closed

libinotify open() considerations #10

grayed opened this issue Aug 5, 2014 · 5 comments

Comments

@grayed
Copy link

grayed commented Aug 5, 2014

libinotify tries to open named pipes (FIFOs) as well as other files. And this leads to lockups because those files are usually either already open, or would be open soon. In particular, that breaks Kile 2.1 (KDE4 version) on OpenBSD, when "inotify" method is used in KDirWatch: Kile creates named pipes in home directory to talk with LyX server, and then tries to use them. But there is a KDirWatch object being created at other place in program, that monitors home directory, too. As a result, Kile gets stuck at watch_init().

Even more, actually Kile creates symlinks to pipes created under /tmp; this uncovers that libinotify doesn't use O_NOFOLLOW when adding a watch - IMHO, that's a bug, too.

@dmatveev
Copy link
Owner

Hi!

Thanks for report and sorry for a delay with reply (I am in a trips now so slow on response). I will try to fix it after return. So the main idea is to skip named pipes and to use NOFOLLOW?

-Dmitry

@grayed
Copy link
Author

grayed commented Aug 17, 2014

2014-08-16 22:07 GMT+04:00 Dmitry Matveev notifications@github.com:

Hi!

Thanks for report and sorry for a delay with reply (I am in a trips now so slow on response). I will try to fix it after return. So the main idea is to skip named pipes and to use NOFOLLOW?

Yep. But, please, don't treat me as an expert in this area. :)

WBR,
Vadim Zhukov

@dmatveev
Copy link
Owner

dmatveev commented Oct 5, 2014

Though initially I've thought that following symlinks is a feature and not a bug, the original Linux inotfiy also does not provide notifications for symlinks. Thanks!

@xaionaro
Copy link

xaionaro commented Oct 5, 2014

the original Linux inotfiy also does not provide notifications for symlinks

@dmatveev, actually it does. It provides notifications about symlinks itself (without following). I can prepare a tiny inotify-based program to prove it :)

@dmatveev
Copy link
Owner

dmatveev commented Oct 5, 2014

It is exactly what I meant. I've already did some tests, but they had break my Linux system, and now I am currently repairing it. So be careful.

dmatveev added a commit that referenced this issue Oct 5, 2014
* Fixed some typos
* Added test for direct symlink watches (in this case,
  all events should be delivered to the user)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants