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 <[EMAIL PROTECTED]>
Igalia - http://www.igalia.com
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to