From: Felix von Leitner <felix-linuxkernel@fefe.de>
To: LKML <linux-kernel@vger.kernel.org>
Subject: getting mysterious (to me) EINVAL from inotify_rm_watch
Date: Wed, 11 May 2016 16:22:51 +0200 [thread overview]
Message-ID: <20160511142251.GA30812@qarx.de> (raw)
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
next reply other threads:[~2016-05-11 14:30 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-11 14:22 Felix von Leitner [this message]
2016-05-11 14:48 ` getting mysterious (to me) EINVAL from inotify_rm_watch Peter Meerwald-Stadler
2016-05-11 15:09 ` Felix von Leitner
2016-05-11 15:30 ` Felix von Leitner
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20160511142251.GA30812@qarx.de \
--to=felix-linuxkernel@fefe.de \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox