Sounds like a job for HAL and DBUS.
Sounds like a job for HAL and DBUS.
thank you for your fast reply.
hmmm it looks it might be a generally appropriate technique,
however is there some simpler technique of the form
if the kernel (using hotplug or other means) realises that there a usb device has been connected, it should send a singal (SIGUSR1 or some other) which then i can intercept from within the application (and i can do a printf() or smth).
nass
Currently hotplug uses hal to do its job.
A unix signal is sent to a particular application, so you can't simply "attach" to a signal.it should send a singal (SIGUSR1 or some other) which then i can intercept from within the application (and i can do a printf() or smth).
As an alternative you could try to monitor the file system (either /etc/fstab or /mnt/something) if you are sure that the device will be automounted in a particular location but this method might fail, so using HAL is a preffered solution.
ok u convinced me
i will look into it thoroughly
thank you once again.
nass
How about /proc ?As an alternative you could try to monitor the file system (either /etc/fstab or /mnt/something) if you are sure that the device will be automounted in a particular location but this method might fail, so using HAL is a preffered solution.
We can't solve problems by using the same kind of thinking we used when we created them
sunil.thaha (4th December 2006)
Furthermore /proc under Linux starts to be deprecated in favour of /sys so there is a probability that /proc (or at least most of its functionality) will soon vanish from some Linux distros.
sunil.thaha (4th December 2006)
Waw!!
Didn't know all of those... Cross platform, Deprecated !!!
Thanks for sharing the info, Guys
We can't solve problems by using the same kind of thinking we used when we created them
Bookmarks