If the client thread terminates while a pinentry is running, terminate