[Top][All Lists]

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

Re: [PATCH] libfshelp: keep stdin and stdout open

From: Roland McGrath
Subject: Re: [PATCH] libfshelp: keep stdin and stdout open
Date: Fri, 1 Aug 2008 16:19:09 -0700 (PDT)

> I'd agree on the principle to not leave a nul port for stdin/stdout,
> any other opinion on this?

I don't think this is good "on principle".  If there is a principle, it's
that programs should be robust and not assume anything stupid like that fds
0,1 are already open if that's not part of the contract.  It's not part of
the translator interface contract.

However, I don't really strongly object to doing it for the pragmatic
reason that programs tend to be sloppy.  It's consistent with e.g. what
libc does at startup for set-uid programs.

But I just don't think it's really right to paper of sloppy coding.
This is not a security thing for sloppy code like what libc does.
It's just to let sloppy code to be sloppy, which I am not in favor of.


reply via email to

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