#3726: tunnel mode closes child's stderr
---------------------+----------------------
Reporter: lotheac | Owner: mutt-dev
Type: defect | Status: new
Priority: major | Milestone:
Component: mutt | Version: 1.5.23
Keywords: |
---------------------+----------------------
It's not a very good idea to close stderr before exec - if a program
doesn't have fd 2, it can end up printing stuff into fds it opens for
other uses (ie. if those get assigned fd 2).
I found this because my tunnel program, dovecot's libexec/imap, tries to
print something on stderr when it exits. stderr happens to be a read-only
fd at that point, so the program exits nonzero, which mutt actually
reports.
The fix is to redirect stderr to /dev/null instead of closing it.
Attaching patch.
--
Ticket URL: <http://dev.mutt.org/trac/ticket/3726>
Mutt <http://www.mutt.org/>
The Mutt mail user agent