lkml.org 
[lkml]   [2016]   [May]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectgetting mysterious (to me) EINVAL from inotify_rm_watch
Hi,

I am trying to add inotify support to my tail implementation (for -F).
This is what happens:

inotify_init() = 4
inotify_add_watch(4, "/tmp/foo", IN_MODIFY) = 1
inotify_rm_watch(4, 1) = -1 EINVAL (Invalid argument)
inotify_add_watch(4, "/tmp/foo", IN_MODIFY) = 2

There is also some polling, some reading and some statting going on here, but
those are on other descriptors than 4 so they should not matter).

Can somebody explain the EINVAL I'm getting from inotify_rm_watch to me?

This is a stock kernel 4.5.0.

Thanks,

Felix

\
 
 \ /
  Last update: 2016-05-11 17:01    [W:0.042 / U:0.172 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site