I have an app which needs to know whether an USB thumb drive is connected to the system. I used udev to create a file in /tmp to signal the presence of the thumb drive, and the access() system call to check for the file existance. However, this is taking too long on my system, which is very time constrained. Is there a faster way for a process to be notified of the connection?
asked 23 Apr '10, 09:26
Could you not write a script which greps dmesg for the signals when it connects?
answered 23 Apr '10, 22:54