issue with fork
stefw at collabora.co.uk
Sun Aug 14 08:12:22 PDT 2011
On 08/14/2011 02:08 PM, Nikos Mavrogiannopoulos wrote:
> Hey Stef,
> Concerning the issue I had with opensc being unusable with
> p11-kit in my system, I think I have identified it. It seems
> SCardEstablishContext (from libpcsclite used by opensc) starts
> a pcsc server if it is not already running and thus in my system it
> executes fork(). This causes an infinite loop of p11-kit trying to
> reinitialize the same module over and over.
> The problem seems to be in reinitialize_after_fork() which
> sets the initialize_count = 0 in all modules and try to reinitialize
> them causing the loop. I don't have a quick fix but it seems it
> should only include the fully initialized modules, thus allow
> a module to include a fork() in its initialization.
Good catch, I'll look into this and fix it. And hopefully build a test
case along the way.
More information about the p11-glue