public inbox for glibc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug nscd/14906] New: inotify failed when /etc/hosts file change
@ 2012-12-03 10:37 binli at opensuse dot org
  2012-12-03 10:39 ` [Bug nscd/14906] " binli at opensuse dot org
                   ` (7 more replies)
  0 siblings, 8 replies; 9+ messages in thread
From: binli at opensuse dot org @ 2012-12-03 10:37 UTC (permalink / raw)
  To: glibc-bugs

http://sourceware.org/bugzilla/show_bug.cgi?id=14906

             Bug #: 14906
           Summary: inotify failed when /etc/hosts file change
           Product: glibc
           Version: 2.11
            Status: NEW
          Severity: normal
          Priority: P2
         Component: nscd
        AssignedTo: unassigned@sourceware.org
        ReportedBy: binli@opensuse.org
                CC: drepper.fsp@gmail.com
    Classification: Unclassified


Created attachment 6770
  --> http://sourceware.org/bugzilla/attachment.cgi?id=6770
The test program

This test program shows the problem.  I'm creating a watch on /etc/hosts
(looking for modification or deletion), and it's catching only changes of 
the type "echo '#bla' >> /etc/hosts".  It doesn't catch changes via copy
to temporary file, do changes, rename temp file back to /etc/hosts.  That's
what sed -i is using to atomically do the in place changes.

I thought that adding IN_MOVE should help when setting up the watch,
but it doesn't (commented out in the test program).  Even if it would have
helped I would claim the kernel to be broken.  If I include IN_MODIFY
in a watch for /etc/hosts, I'm of course also interested if somebody renames
some random file to the watched filename, as it very certainly is a
modification.

Basically as soon as "sed -i" is done on the file the kernel lost track
of the watch and no changes to the "new" /etc/hosts are tracked anymore.

-- 
Configure bugmail: http://sourceware.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.


^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2015-03-13 18:12 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-03 10:37 [Bug nscd/14906] New: inotify failed when /etc/hosts file change binli at opensuse dot org
2012-12-03 10:39 ` [Bug nscd/14906] " binli at opensuse dot org
2012-12-03 10:40 ` binli at opensuse dot org
2012-12-03 10:43 ` binli at opensuse dot org
2012-12-03 10:45 ` binli at opensuse dot org
2015-02-18  2:12 ` carlos at redhat dot com
2015-02-18  6:25 ` carlos at redhat dot com
2015-03-13 15:11 ` cvs-commit at gcc dot gnu.org
2015-03-13 18:12 ` carlos at redhat dot com

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).