Inotify problem

This is a discussion on Inotify problem within the Linux Programming forums, part of the Platform Specific Boards category; Originally Posted by matsp Have you TRIED using it without oneshot and just putting a bit of delay after you've ...

  1. #16
    Registered User
    Join Date
    Nov 2008
    Posts
    75
    Quote Originally Posted by matsp View Post
    Have you TRIED using it without oneshot and just putting a bit of delay after you've written the file - I'm not suggesting that as a solution, just to get an idea of if a new watch very soon after the file changes is actually what happens or not.

    --
    Mats
    As you can see here :
    Quote Originally Posted by MisterIO View Post
    I've just tried to comment the part of the code where I write new values to the file, after having removed the watch, but it doesn't change anything, I still receive all those events.
    It was completely unrelated to the fact that I was modifying the file contents.

  2. #17
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Quote Originally Posted by MisterIO View Post
    As you can see here :

    It was completely unrelated to the fact that I was modifying the file contents.
    Yes, of course, I remember reading that now that you remind me. Poor short term memory - probably my age...

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #18
    Registered User
    Join Date
    Nov 2008
    Posts
    75
    Quote Originally Posted by matsp View Post
    Yes, of course, I remember reading that now that you remind me. Poor short term memory - probably my age... ;)

    --
    Mats
    No prob;). But that would have been a serious kernel problem, because if you have races with this scheme :
    remove_watch
    write_whatever_you_want
    close_file
    add_new_watch
    then it means that you're not doing the right thing in the kernel. After the remove_watch you should be free to do whatever you want and after the close file you should be free to add any watch you want.
    Obviously talking about a single-threaded app.
    Last edited by MisterIO; 11-14-2008 at 10:15 AM.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 10:22 AM
  2. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  3. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  4. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM
  5. beginner problem
    By The_Nymph in forum C Programming
    Replies: 4
    Last Post: 03-05-2002, 04:46 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21