[Python-Dev] PEP 389: argparse - new command line parsing module (original) (raw)
Jon Ribbens jon+python-dev at unequivocal.co.uk
Thu Oct 1 12:39:38 CEST 2009
- Previous message: [Python-Dev] OT: detatching from terminal (was: Re: PEP 389: argparse - new command line parsing module)
- Next message: [Python-Dev] PEP 389: argparse - new command line parsing module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Thu, Oct 01, 2009 at 09:58:59AM +0100, Paul Moore wrote:
(Question - is it ever possible for a Unix program to have invalid file descriptors 0,1 and 2? At startup - I'm assuming anyone who does os.close(1) knows what they are doing!)
Yes, at startup you just have the file descriptors your parent process gave you. This may or may not include 0, 1, and 2, and may or may not include other descriptors too.
I seem to recall there have been security holes caused in the past by people assuming 0-2 will exist.
- Previous message: [Python-Dev] OT: detatching from terminal (was: Re: PEP 389: argparse - new command line parsing module)
- Next message: [Python-Dev] PEP 389: argparse - new command line parsing module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]