]> granicus.if.org Git - p11-kit/commit
p11-kit: Use pthread_atfork() in a safe manner
authorStef Walter <stefw@redhat.com>
Fri, 3 Oct 2014 07:42:27 +0000 (09:42 +0200)
committerStef Walter <stefw@redhat.com>
Fri, 3 Oct 2014 18:56:16 +0000 (20:56 +0200)
commit16e25b2890927108ec15297aabb1d86a49792741
tree495215b96e664348fa6651696d517b22215d8467
parenta3b1e1c2f2c8c1f14293d8158b6dfeb2a6560908
p11-kit: Use pthread_atfork() in a safe manner

Instead of trying to perform actions in pthread_atfork() which
are not async-signal-safe, just increment a counter so we can
later tell if the process has forked.

Note this does not make it safe to mix threads and forking without
immediately execing. This is a far broader problem that p11-kit,
however we now do the right thing when fork+exec is used from a
thread.

https://bugs.freedesktop.org/show_bug.cgi?id=84567
common/library.c
common/library.h
common/mock.c
p11-kit/modules.c
p11-kit/proxy.c
p11-kit/proxy.h
p11-kit/rpc-client.c
p11-kit/test-proxy.c
p11-kit/test-rpc.c