]> code.delx.au - offlineimap/commit
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)
commit79a596be7b98801d71b0ac8d120384606274ce42
tree8387f7e2550d050d586b9cbbd9962f06cef6e446
parent82d5d5e675ca44c35dd1b1295c065d3b34d339f2
Don't leave preauthtunnel zombies with autorefresh

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
offlineimap/imaplib.py