duplicity-talk
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Duplicity-talk] idea on gpg zombies


From: Kenneth Loafman
Subject: Re: [Duplicity-talk] idea on gpg zombies
Date: Tue, 28 Jun 2011 16:39:07 -0500

We make it in a thread so it can proceed.  At the end of the waitpid all of the closed file handles are harvested (except on a Mac) and the task is allowed to close.  Without the threading, you get a pile of gpg processes that don't go away until the very end.  The parent has to issue the waitpid to get this to happen, and on its own, duplicity waits until the very end of the iteration to take care of this task.

...Ken

On Tue, Jun 28, 2011 at 3:38 PM, <address@hidden> wrote:
i just read a little about the process closing with waitpid in python. i also read through GnuPGInterface.py and gpg.py.

if i understand correctly this gpg.py opens the process and deals as a filehandler which pipes data in or out of the process. on close it is supposed to call the wait method, which actually calls waitpid, which should theoretically end the process thread.

two things occure to me.

thing one:
i miss an explicit closing of pipes and file handlers here. i could imagine that open fh/pipes could leave a thread hanging. a loop closing all those in wait() might help here.

thing two:
the other is, why do we actually thread this? is duplicity multithreaded at all? don't we actually write/read one file after the other?
notable exception maybe the asynchronous mode. but that's uploading vs file creation in parallel so no gpg threading needed here.
crazy idea. let's tell GnuPGInterface.py to ignore threading, i see it is built with a fallback if threading returns a 0 pid and simply stays in the parent process.

just my two things,
regards ede/duply.net

_______________________________________________
Duplicity-talk mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/duplicity-talk


reply via email to

[Prev in Thread] Current Thread [Next in Thread]