Control: reassign 795934 icedove
Control: retitle 795934 leaks file descriptors to attachment handlers
Control: found 795934 38.1.0-1
evince does not retrieve the document itself; icedove does give it a
filename in /tmp for the attachment.
The problem is that evince is executed as a subprocess of icedove, and
icedove does not either mark its open file descriptors as close-on-exec,
or close all file descriptors (except for stdin, stdout, stderr and any
other deliberately-inherited fds) in the child process after fork() but
before exec(). Any process that executes subprocesses should do at least
one of those two things, preferably both.
As a result, file descriptors that were open in icedove (including
sockets, pipes, the cache, and mailbox files) remain open in the child
process.
I can reproduce this with a different attachment handler, which
demonstrates that this is not unique to evince: if I open an attachment
with gvim, then "ls -l /proc/$(pgrep gvim)/fd", I can see that gvim has
incorrectly inherited various open file descriptors pointing to sockets,
pipes, ~/.icedove/*/Cache/*, and ~/.icedove/*/ImapMail/*/*.msf.
Quoting the rest of Andrew's report for the icedove maintainer.
Regards,
S