[issue7111] abort when stderr is closed
Daniel Stutzbach
report at bugs.python.org
Thu Feb 3 21:49:11 CET 2011
Daniel Stutzbach <stutzbach at google.com> added the comment:
On Thu, Feb 3, 2011 at 12:18 PM, Antoine Pitrou <report at bugs.python.org> wrote:
> I just took a look at http://pypi.python.org/pypi/python-daemon/, and it
> uses dup2() to redirect standard streams, which is far nicer.
I'm more worried about the case where a daemon launches python.
At startup, could we check that 2 and 3 are valid file descriptors,
and, if not, open /dev/null? That way, they cannot later be
inadvertently assigned to some other file?
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue7111>
_______________________________________
More information about the Python-bugs-list
mailing list