[Mono-list] possible bug with FileSystemWatcher

Alex Mac lots.of.mailing.lists at gmail.com
Wed Oct 4 05:05:15 EDT 2006


On 04/10/06, Alex Mac <lots.of.mailing.lists at gmail.com> wrote:
> On 03/10/06, Miguel de Icaza <miguel at ximian.com> wrote:
> > Hello,
> >
> > > I'm trying to monitor /dev using the FileSystemWatcher however my app
> > > seems to hang at the point when i call "watcher.IncludeSubdirectories
> > > = true" without that line the code runs fine. Monitoring /tmp with
> > > that option turned on does work...
> > >
> > > Also if i try running the code with "MONO_MANAGED_WATCHER=1" then I
> > > get the following error message continuously appearing:
> >
> > One of the problems that we ran into while trying to debug this problem
> > is that it seems that /dev/fd/6 is a symlink that points to a
> > non-existant file called "inotify"
> >
> > The file is special in that if you access /dev/fd/6 you get a valid file
> > handle, reporting that its a directory, but if you try to follow the
> > symlink you get a failure (because "inotify" does not exist).
> >
> > We are quite puzzled about this, not sure quite what to do, because Mono
> > determines that we have a directory, and when we look for it, it tells
> > us that its not a directory.
> >
> > Miguel.
> >
>
> I dont have /dev/fd/6 on my system but I guess there must be other
> "special" dev files...
>
> Really I'm just interested in monitoring /dev/dvb but since the FSW
> cant handle monitoring a directory that might not currently exist I
> have to monitor /dev recursively.
>
> I guess I'll have to just use two watchers one for /dev and one for
> /dev/dvb when it appears, which is a bit lame.

Hmm, although that does work I guess there's no guarantee that the
second FSW will be created in time to catch the first events to come
from /dev/dvb

Monitoring /dev recursively would be preferable


More information about the Mono-list mailing list