Hi, one user found problem with restarting nut. upsdrvctl does not wait for drivers being really terminated. In init scripts we have following:
killproc upsmon killproc upsd upsdrvctl stop and then upsdrvctl start upsd upsmon problem is upsdrvctl stop only sends terminating signals but does not wait for driver termination. This makes driver fail to start sometimes when old driver is still running because "device is locked by another process". I've prepared patch cloning stop_driver function to wait_driver_stoped which blocks until timeout or until /proc/<pid> disappears. This function is called after send_all_drivers(stop_driver). See attached patch. If you don't want to make this changes I can modify init script restart function instead to wait until all processes with pid in /var/run/nut/*.pid files are dead, but I find this quite ugly. Any comments? Michal _______________________________________________ Nut-upsdev mailing list [email protected] http://lists.alioth.debian.org/mailman/listinfo/nut-upsdev
