]> code.delx.au - offlineimap/commitdiff
Don't leave preauthtunnel zombies with autorefresh
authorJohn Goerzen <jgoerzen@complete.org>
Wed, 14 Mar 2007 01:54:19 +0000 (02:54 +0100)
committerJohn Goerzen <jgoerzen@complete.org>
Wed, 14 Mar 2007 01:54:19 +0000 (02:54 +0100)
From: Peter Colberg

Hello,

using offlineimap with the preauthtunnel option to start a remote
IMAP daemon via ssh, a zombie process is left behind during the
autorefresh sleep period if not holding the connection open.

Above behaviour is a result of using os.popen2 to spawn the tunnel
process, which makes it impossible waiting for the child process
to terminate when shutting down the tunnel.

The patch included below fixes the issue by employing the Popen
class from the subprocess module, which seems to be the preferred
way to spawn processes and connect to their pipes in any case (at
least since python version 2.4.4, which fixes a memory leak in the
subprocess module).

Regards,
Peter

fixes deb#410730


No differences found