[paramiko] Surviving fork()
james bardin
jbardin at bu.edu
Mon Mar 1 08:20:32 PST 2010
On Mon, Mar 1, 2010 at 8:25 AM, Nikolaus Rath <Nikolaus at rath.org> wrote:
> Hello,
>
> I would like to keep an established ssh connection when daemonizing,
> i.e. when calling fork().
>
> Is there a way to do this? I suppose paramiko would have to run either
> single threaded, or have to recreate its threads after the fork()
> call...
>
>
Paramiko is threaded by design, and an established connection requires
the cooperation of two or more threads. There isn't any reasonable
way to recreate the threads after fork() from within paramiko, and I
actually don't think python defines any mechanism to re-enter a thread
after a fork.
-jim
More information about the paramiko
mailing list