You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This program can act on the device, however it must not run for any extended period of time, because udev is effectively paused while these programs are running. One workaround for this limitation is to make sure your program immediately detaches itself.
Two options :
If the program doesn't have to run continuously and is just here to check if it has been run, a lock file, containing the script PID while running and 0 upon successful execution, can be created to avoid a re-run.
If it is mandatory for the program to run continuously, the best way is to create a daemon and start it in the udev rule. The daemon init script will check if it's already running and the appropriate action to take.
What do you think ?
I have the knowledge to implement both scenario but prefer to ask for your lights and guidance first ;)
Regards,
Bad
The text was updated successfully, but these errors were encountered:
Thanks BadWolf, the loop can and will be removed in the next release. It is apparently not necessary anymore as all processes initiated by uavpal_disco.sh (scripts and daemons) are detached/non-blocking.
SoftIce
Hello,
I went through the Disco4G code and it's an impressive work!
I wondered why the program is kept running when I stumble on the "Uggly loop" :
disco4g/disco/uavpal/bin/uavpal_disco.sh
Lines 139 to 141 in 7c13449
As explained here: http://reactivated.net/writing_udev_rules.html
Two options :
What do you think ?
I have the knowledge to implement both scenario but prefer to ask for your lights and guidance first ;)
Regards,
Bad
The text was updated successfully, but these errors were encountered: