On Wed, Sep 17, 2014 at 2:58 PM, Ludovic Rousseau < [email protected]> wrote:
> >> > If A dies then the lock will be released automatically. If that does > >> > not occur then it is a bug in pcsc-lite and you should report it. > > > > What locking system are you using? Flock? Mutex? > > Can you link any source where using it? I'm very interested in this! > > MSGCleanupClient() (from winscard_svc.c [1]) is called when the client > application closes (intentionally or not) the socket communication > with pcscd. > MSGCleanupClient() then does the cleanup (calls SCardReleaseContext). > > Bye > > [1] > http://anonscm.debian.org/viewvc/pcsclite/trunk/PCSC/src/winscard_svc.c?view=markup > line 968 > This question comes to light due the problems we had in the past with our globally-shared mutex. In our case we have several applications invoking a library (not a service) which had to manage concurrency. In the beggining we used pthread_mutex, but as OSX 10.6 didnt support pthread_mutexattr_setpshared, pthread_mutexattr_setrobust, pthread_mutex_consistent, we ended using systemV semaphores. In windows we used named semaphores and in linux pthread_mutex_consistent when abandoned Thx for the link! ;)
_______________________________________________ Pcsclite-muscle mailing list [email protected] http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle
