Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deterministically wait on hotplug_libusb shutdown
Change HPStopHotPluggables() to actually wait until the background hotplug thread exits. This makes sure that the hotplug mechanism doesn't continue working throughout the daemon's shutdown process, and hence use-after-frees (if a reader is added/removed after the readerfactory is shut down), memory leaks etc. are prevented. Note: this is expected to make the "SYS_Sleep(1)" trick in pcscdaemon.c unnecessary, replacing it with a more reliable alternative. We don't delete the sleep in the same commit in case it turns out to be crucial for some other reason.
- Loading branch information