Child processes go defunct (lp:#755545)

[Original report](https://bugs.launchpad.net/bugs/755545) created by **Wladimir J. van der Laan (laanwj)**
```
I'm doing a verify of a fairly large remote backup and see this in the
process list. It seems like the child gpg processes go defunct and are not
properly cleaned up, and there's many of them.

root      7545 17.0  1.5  16116 12244 pts/4    S+   10:37  52:41
\_ /usr/bin/python /usr/bin/duplicity verify -v4 --include-globbing-filelis
root      7592  0.0  0.0      0     0 pts/4    Z+   10:38   0:01
\_ [gpg] <defunct>
root      7625  0.0  0.0      0     0 pts/4    Z+   10:39   0:00
\_ [gpg] <defunct>
root      7632  0.0  0.0      0     0 pts/4    Z+   10:39   0:00
\_ [gpg] <defunct>
root      7637  0.0  0.0      0     0 pts/4    Z+   10:39   0:00
\_ [gpg] <defunct>
root      7644  0.0  0.0      0     0 pts/4    Z+   10:39   0:00
\_ [gpg] <defunct>
root      7651  0.0  0.0      0     0 pts/4    Z+   10:39   0:00
\_ [gpg] <defunct>
root      7659  0.0  0.0      0     0 pts/4    Z+   10:40   0:00
\_ [gpg] <defunct>
root      7684  0.0  0.0      0     0 pts/4    Z+   10:40   0:02
\_ [gpg] <defunct>
root      7691  0.0  0.0      0     0 pts/4    Z+   10:41   0:02
\_ [gpg] <defunct>
root      7698  0.0  0.0      0     0 pts/4    Z+   10:41   0:02
\_ [gpg] <defunct>
root      7707  0.0  0.0      0     0 pts/4    Z+   10:41   0:03
\_ [gpg] <defunct>
root      7714  0.0  0.0      0     0 pts/4    Z+   10:41   0:03
\_ [gpg] <defunct>
root      7736  0.0  0.0      0     0 pts/4    Z+   10:42   0:02
\_ [gpg] <defunct>
root      7743  0.0  0.0      0     0 pts/4    Z+   10:42   0:02
\_ [gpg] <defunct>
root      7752  0.0  0.0      0     0 pts/4    Z+   10:42   0:02
\_ [gpg] <defunct>
root      7763  0.0  0.0      0     0 pts/4    Z+   10:42   0:03
\_ [gpg] <defunct>
root      7770  0.0  0.0      0     0 pts/4    Z+   10:42   0:03
\_ [gpg] <defunct>
root      7777  0.0  0.0      0     0 pts/4    Z+   10:43   0:01
\_ [gpg] <defunct>
root      7782  0.0  0.0      0     0 pts/4    Z+   10:43   0:00
\_ [gpg] <defunct>
root      7787  0.0  0.0      0     0 pts/4    Z+   10:43   0:00
\_ [gpg] <defunct>
root      7796  0.0  0.1   4580  1472 pts/4    SL+  10:43   0:02
\_ gpg --status-fd 98 --passphrase-fd 102 --logger-fd 95 --batch --no-t
root      7803  0.0  0.0      0     0 pts/4    Z+   10:43   0:00
\_ [gpg] <defunct>
root      7808  0.0  0.1   4580  1468 pts/4    SL+  10:43   0:00
\_ gpg --status-fd 106 --passphrase-fd 110 --logger-fd 103 --batch --no
root      7815  0.0  0.0      0     0 pts/4    Z+   10:44   0:01
\_ [gpg] <defunct>
root      7820  0.0  0.0      0     0 pts/4    Z+   10:44   0:00
\_ [gpg] <defunct>
root      7825  0.0  0.0      0     0 pts/4    Z+   10:44   0:00
\_ [gpg] <defunct>
root      7836  0.0  0.0      0     0 pts/4    Z+   10:44   0:04
\_ [gpg] <defunct>
root      7843  0.0  0.0      0     0 pts/4    Z+   10:44   0:02
\_ [gpg] <defunct>
root      7850  0.0  0.0      0     0 pts/4    Z+   10:44   0:02
\_ [gpg] <defunct>
root      7870  0.0  0.0      0     0 pts/4    Z+   10:45   0:02
\_ [gpg] <defunct>
root      7877  0.0  0.0      0     0 pts/4    Z+   10:45   0:02
\_ [gpg] <defunct>
root      7884  0.0  0.0      0     0 pts/4    Z+   10:45   0:04
\_ [gpg] <defunct>
root      7893  0.0  0.0      0     0 pts/4    Z+   10:45   0:05
\_ [gpg] <defunct>
root      7903  0.0  0.0      0     0 pts/4    Z+   10:46   0:04
\_ [gpg] <defunct>
root      7911  0.0  0.0      0     0 pts/4    Z+   10:46   0:03
\_ [gpg] <defunct>
root      7920  0.0  0.0      0     0 pts/4    Z+   10:46   0:02
\_ [gpg] <defunct>
root      7929  0.0  0.0      0     0 pts/4    Z+   10:46   0:04
\_ [gpg] <defunct>
root      7938  0.0  0.0      0     0 pts/4    Z+   10:47   0:02
\_ [gpg] <defunct>
root      7945  0.0  0.0      0     0 pts/4    Z+   10:47   0:02
\_ [gpg] <defunct>
root      7952  0.0  0.0      0     0 pts/4    Z+   10:47   0:02
\_ [gpg] <defunct>
root      7961  0.0  0.0      0     0 pts/4    Z+   10:47   0:02
\_ [gpg] <defunct>
root      7968  0.0  0.1   4580  1468 pts/4    SL+  10:47   0:02
\_ gpg --status-fd 182 --passphrase-fd 186 --logger-fd 179 --batch --no
root      7991  0.0  0.0      0     0 pts/4    Z+   10:48   0:04
\_ [gpg] <defunct>
root      8001  0.0  0.0      0     0 pts/4    Z+   10:48   0:02
\_ [gpg] <defunct>
root      8008  0.0  0.0      0     0 pts/4    Z+   10:48   0:02
\_ [gpg] <defunct>
root      8034  0.0  0.0      0     0 pts/4    Z+   10:49   0:02
\_ [gpg] <defunct>
root      8043  0.0  0.1   4580  1468 pts/4    SL+  10:49   0:04
\_ gpg --status-fd 206 --passphrase-fd 210 --logger-fd 203 --batch --no
root      8050  0.0  0.0      0     0 pts/4    Z+   10:49   0:02
\_ [gpg] <defunct>
root      8057  0.0  0.0      0     0 pts/4    Z+   10:50   0:01
\_ [gpg] <defunct>
root      8064  0.0  0.0      0     0 pts/4    Z+   10:50   0:03
\_ [gpg] <defunct>
root      8071  0.0  0.0      0     0 pts/4    Z+   10:50   0:01
\_ [gpg] <defunct>
root      8080  0.0  0.0      0     0 pts/4    Z+   10:50   0:01
\_ [gpg] <defunct>
root      8087  0.0  0.0      0     0 pts/4    Z+   10:50   0:01
\_ [gpg] <defunct>
root      8109  0.0  0.0      0     0 pts/4    Z+   10:51   0:04
\_ [gpg] <defunct>
root      8116  0.0  0.0      0     0 pts/4    Z+   10:51   0:02
\_ [gpg] <defunct>
root      8125  0.0  0.0      0     0 pts/4    Z+   10:51   0:02
\_ [gpg] <defunct>
root      8134  0.0  0.0      0     0 pts/4    Z+   10:51   0:02
\_ [gpg] <defunct>
root      8143  0.0  0.0      0     0 pts/4    Z+   10:52   0:03
\_ [gpg] <defunct>
root      8150  0.0  0.0      0     0 pts/4    Z+   10:52   0:03
\_ [gpg] <defunct>
root      8159  0.0  0.1   4580  1468 pts/4    SL+  10:52   0:05
\_ gpg --status-fd 258 --passphrase-fd 262 --logger-fd 255 --batch --no
root      8168  0.0  0.0      0     0 pts/4    Z+   10:52   0:05
\_ [gpg] <defunct>
root      8177  0.0  0.0      0     0 pts/4    Z+   10:53   0:05
\_ [gpg] <defunct>
root      8186  0.0  0.0      0     0 pts/4    Z+   10:53   0:05
\_ [gpg] <defunct>
root      8197  0.0  0.0      0     0 pts/4    Z+   10:53   0:06
\_ [gpg] <defunct>
root      8236  0.0  0.0      0     0 pts/4    Z+   10:54   0:05
\_ [gpg] <defunct>
root      8245  0.0  0.0      0     0 pts/4    Z+   10:54   0:05
\_ [gpg] <defunct>
root      8254  0.0  0.0      0     0 pts/4    Z+   10:55   0:05
\_ [gpg] <defunct>
root      8263  0.0  0.0      0     0 pts/4    Z+   10:55   0:05
\_ [gpg] <defunct>
root      8272  0.0  0.1   4580  1468 pts/4    SL+  10:55   0:05
\_ gpg --status-fd 298 --passphrase-fd 302 --logger-fd 295 --batch --no
root      8281  0.0  0.0      0     0 pts/4    Z+   10:56   0:05
\_ [gpg] <defunct>
root      8294  0.0  0.0      0     0 pts/4    Z+   10:56   0:05
\_ [gpg] <defunct>
root      8305  0.0  0.0      0     0 pts/4    Z+   10:56   0:05
\_ [gpg] <defunct>
root      8328  0.0  0.0      0     0 pts/4    Z+   10:57   0:05
\_ [gpg] <defunct>
root      8342  0.0  0.0      0     0 pts/4    Z+   10:57   0:14
\_ [gpg] <defunct>
root      8350  0.0  0.0      0     0 pts/4    Z+   10:57   0:05
\_ [gpg] <defunct>
root      8360  0.0  0.0      0     0 pts/4    Z+   10:58   0:05
\_ [gpg] <defunct>
root      8369  0.0  0.0      0     0 pts/4    Z+   10:58   0:04
\_ [gpg] <defunct>
root      8378  0.0  0.0      0     0 pts/4    Z+   10:58   0:04
\_ [gpg] <defunct>
root      8387  0.0  0.0      0     0 pts/4    Z+   10:58   0:04
\_ [gpg] <defunct>
root      8396  0.0  0.0      0     0 pts/4    Z+   10:59   0:05
\_ [gpg] <defunct>
root      8403  0.0  0.0      0     0 pts/4    Z+   10:59   0:04
\_ [gpg] <defunct>
root      8410  0.0  0.0      0     0 pts/4    Z+   10:59   0:00
\_ [gpg] <defunct>
root      8415  0.0  0.0      0     0 pts/4    Z+   10:59   0:00
\_ [gpg] <defunct>
root      8420  0.0  0.0      0     0 pts/4    Z+   10:59   0:00
\_ [gpg] <defunct>
root      8427  0.0  0.0      0     0 pts/4    Z+   10:59   0:00
\_ [gpg] <defunct>
root      8447  0.0  0.0      0     0 pts/4    Z+   11:00   0:00
\_ [gpg] <defunct>
root      8462  0.0  0.0      0     0 pts/4    Z+   11:00   0:13
\_ [gpg] <defunct>
root      8473  0.0  0.1   4580  1464 pts/4    SL+  11:00   0:01
\_ gpg --status-fd 374 --passphrase-fd 378 --logger-fd 371 --batch --no
root      8480  0.0  0.1   4580  1468 pts/4    SL+  11:01   0:01
\_ gpg --status-fd 378 --passphrase-fd 382 --logger-fd 375 --batch --no
root      8502  0.0  0.0      0     0 pts/4    Z+   11:01   0:00
\_ [gpg] <defunct>
root      8509  0.0  0.0      0     0 pts/4    Z+   11:02   0:01
\_ [gpg] <defunct>
root      8514  0.0  0.0      0     0 pts/4    Z+   11:02   0:00
\_ [gpg] <defunct>
root      8521  0.0  0.0      0     0 pts/4    Z+   11:02   0:01
\_ [gpg] <defunct>
root      8530  0.0  0.0      0     0 pts/4    Z+   11:02   0:00
\_ [gpg] <defunct>
root      8541  0.0  0.0      0     0 pts/4    Z+   11:02   0:06
\_ [gpg] <defunct>
root      8561  0.0  0.0      0     0 pts/4    Z+   11:03   0:00
\_ [gpg] <defunct>
root      8569  0.0  0.0      0     0 pts/4    Z+   11:03   0:00
\_ [gpg] <defunct>
root     12032  0.0  0.1   4580  1468 pts/4    SL+  12:56   0:07
\_ gpg --status-fd 424 --passphrase-fd 432 --logger-fd 8 --batch --no-t
root     12211  0.1  0.1   4580  1472 pts/4    SL+  13:02   0:09
\_ gpg --status-fd 280 --passphrase-fd 419 --logger-fd 6 --batch --no-t
root     12751  0.0  0.0      0     0 pts/4    Z+   13:21   0:03
\_ [gpg] <defunct>
root     13871  0.1  0.0      0     0 pts/4    Z+   13:57   0:08
\_ [gpg] <defunct>
root     17177  2.9  0.1   4784  1472 pts/0    Ss+  15:45   0:00
\_ /usr/bin/sftp -oServerAliveInterval=15 -oServerAliveCountMax=2 orion
root     17178  6.0  0.4   6280  3472 pts/0    S+   15:45   0:01
\_ /usr/bin/ssh -oForwardX11 no -oForwardAgent no -oPermitLocalComm

Duplicity version: 0.6.13
Python version: 2.5.2
OS distro and version: Ubuntu 8.04 LTS
Type of filesystem:  reiserfs
```

Story points: 6.0