Selon Russell Stuart <[EMAIL PROTECTED]>:
> I am using pcsc with a USB CCID reader.  Every so often it hangs.
> The reason is revealed by this backtrace, which was captured
> while it was hung:

Very nice catch.

> The attached patch fixes the problem by forcing hotplug reload
> events to be handled synchronously.

Thanks

> Unfortunately it probably
> isn't acceptable in its current form as it is very Unix dependant,
> and pcscd is obviously meant to be multi-platform.  To make it
> multi-platform it would have to be a polling loop which is
> something I dislike, or your would have to abstract
> pthread_cond_wait in your thread_*.c libraries.

I am not sure pthread_cond_wait() would help here. From its manpage I see:

  ASYNC-SIGNAL SAFETY
       The  condition  functions  are not async-signal safe, and should not be
       called from a signal handler. In particular, calling  pthread_cond_sig-
       nal  or  pthread_cond_broadcast  from a signal handler may deadlock the
       calling thread.

So pthread_cond_signal() can't be used in HPReCheckSerialReaders() called from
signal_reload().

Am I right?

Bye

--
Ludovic Rousseau                           [EMAIL PROTECTED]
-- Normaliser Unix c'est comme pasteuriser le Camembert, L.R. --

Reply via email to