I'm working on a project for a customer and I've hit a really weird problem that is raising my stress level more than I like.

On this project, I need to start and stop an application every time a USB device is plugged in or unplugged. So I started modifying usb.agent to activate the application on an add command and stop it on a remove command.

if I do the application start or stop on the command line, everything works just fine. But from usb.agent, stopping the application causes a wedged application thread which cannot be shut down and prevents the application from starting up and running again. The only way to clean up everything is to reboot.

The application in question uses threads and I believe (since I'm not the author) that all of the threads are shut down properly and all of the handles are closed before we hit exit. In trying to debug the problem, I have been able to print out a log message just before exit and a log message gets out cleanly but exit does not complete and terminate the process.

So, this raises the question what is different about the usb.agent environment as compared to an ordinary shell environment.

Many thanks for any assistance

---eric




-------------------------------------------------------
This SF.net email is sponsored by: Does your code think in ink? You could win a Tablet PC. Get a free Tablet PC hat just for playing. What are you waiting for?
http://ads.sourceforge.net/cgi-bin/redirect.pl?micr5043en
_______________________________________________
[EMAIL PROTECTED]
To unsubscribe, use the last form field at:
https://lists.sourceforge.net/lists/listinfo/linux-usb-users

Reply via email to