On 2017-10-06 17:05, Grant Edwards <grant.b.edwa...@gmail.com> wrote:
> On 2017-10-06, Thomas Jollans <t...@tjol.eu> wrote:
>> Seriously? sys.stdin can be None? That's terrifying.
>
> Why?
>
> Unix daemons usually run with no stdin, stderr, or stdout.

That's pretty rare. Usually they are just connected to /dev/null or a
log file. Completely closing them is dangerous: The next open will use
the first free file descriptor and there may be parts of your daemon
(e.g. a library function) which assumes that it can write on file
descriptor 2: You don't want random error messages or warnings appear in
one of your output files (there have been a few security holes because
of this).

        hp


-- 
   _  | Peter J. Holzer    | Fluch der elektronischen Textverarbeitung:
|_|_) |                    | Man feilt solange an seinen Text um, bis
| |   | h...@hjp.at         | die Satzbestandteile des Satzes nicht mehr
__/   | http://www.hjp.at/ | zusammenpaƟt. -- Ralph Babel
-- 
https://mail.python.org/mailman/listinfo/python-list

Reply via email to