LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Ubuntu (https://www.linuxquestions.org/questions/ubuntu-63/)
-   -   How can I detect removable devices attached at real time using C program (https://www.linuxquestions.org/questions/ubuntu-63/how-can-i-detect-removable-devices-attached-at-real-time-using-c-program-869976/)

amanciotarrito@yahoo.com 03-21-2011 08:54 AM

How can I detect removable devices attached at real time using C program
 
Hello I want to devolep one "C/C++" program that will work as a daemon. My daemon will be running all the time, and whenever anybody attaches removable devices to machine on which my daemon is running, My daemon should catch that event and also should show me where that device has been mounted.
Can anybody tell me how can I do this?
THANKS.

David1357 03-21-2011 09:57 AM

Quote:

Originally Posted by amanciotarrito@yahoo.com (Post 4298007)
My daemon should catch that event and also should show me where that device has been mounted.

You should probably start by looking at the documentation and source for udev.


All times are GMT -5. The time now is 08:04 PM.