Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Python: Dev

OT: detatching from terminal (was: Re: PEP 389: argparse - new command line parsing module)

 

 

Python dev RSS feed   Index | Next | Previous | View Threaded


floris.bruynooghe at gmail

Oct 1, 2009, 2:38 AM

Post #1 of 1 (303 views)
Permalink
OT: detatching from terminal (was: Re: PEP 389: argparse - new command line parsing module)

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!)

Normally you don't close fd 0, 1 & 2 but rather redirect them to
/dev/null (a black hole). That saves you from nastiness when a
library or something misbahaves and tries to use one of those. It
would have been nice if windows GUI-mode programs as you describe them
would do something similar.

Regards
Floris

--
Debian GNU/Linux -- The Power of Freedom
www.debian.org | www.gnu.org | www.kernel.org
_______________________________________________
Python-Dev mailing list
Python-Dev [at] python
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: http://mail.python.org/mailman/options/python-dev/list-python-dev%40lists.gossamer-threads.com

Python dev RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.