[lkml]   [2007]   [Jul]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Subjectinotify_rm_watch() EINVAL race condition for deleted files
1. Add IN_DELETE_SELF watch to a file
2. unlink() the file
3. Try to remove the watch -> EINVAL

I undestand this happens because there's an IN_IGNORED event in the
inotify queue, but couldn't inotify_rm_watch() be silent about it if the
event hasn't been read()? Otherwise there's a race condition between the
read() and inotify_rm_watch(), so I'll just always have to ignore EINVAL
errors. I don't like ignoring errors.

( + ext3 if it matters)

[unhandled content-type:application/pgp-signature]
 \ /
  Last update: 2007-07-09 06:31    [W:0.021 / U:1.968 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site