Re: monitoring file changes in a sysfs filesystem
- From: Miguel GÃmez <magomez igalia com>
- To: gtk-app-devel-list gnome org
- Subject: Re: monitoring file changes in a sysfs filesystem
- Date: Thu, 16 Oct 2008 13:16:50 +0200
I'm trying to monitor the changes in a file from /sys (as you know, it's
a sysfs filesystem), but setting a file monitor with g_file_monitor_file
doesn't work. No matter what I do, I can't receive the changed signal
from the file monitor.
sysfs, being a virtual file system, doesn't generate any notification
events.
Yep, I've realized about that. Anyway, I've found that it's possible to
monitor changes in these files creating a g_io_channel for the file and
setting a watch on it.
you will have to poll yourself, but it's not such a good idea; if you're
looking at hardware events you should probably use udev or HAL.
Yes, you are right :)
Thanks!
--
Miguel Gomez <magomez igalia com>
Igalia - http://www.igalia.com
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]