Comment 3 for bug 430908

Revision history for this message
Juan J. Martínez (jjmartinez) wrote :

I can't re-open the file, and I've tried several approaches.

Finally I could workaround the problem with:

 1. When creating the daemon context, use files_preserve to point the fileno that you don't want to close. That's not easy because there may be unused file descriptors before the rng file handle.
 2. When you open the daemon context, you need to call Crypto.Random.atfork()

In that way I can use paramiko with daemon and seems to work properly, although figuring out what's the file descriptor for that rng file it's a little bit tricky.