On Mon, Jan 07, 2013 at 06:03:54PM -0600, Benjamin Peterson wrote: > 2013/1/7 Victor Stinner <victor.stin...@gmail.com>: > > Hi, > > > > I would like add a new flag to open() mode to close the file on exec: > > "e". This feature exists using different APIs depending on the OS and > > OS version: O_CLOEXEC, FD_CLOEXEC and O_NOINHERIT. Do you consider > > that such flag would be interesting? Having close-on-exec makes the code much cleaner, often. Definitely interesting.
> I'm not sure it's worth cluttering the open() interface with such a > non-portable option. People requiring such control should use the > low-level os.open interface. If the best-effort fallback is included, it is quite portable. Definitely all modern and semi-modern systems support either the atomic or the nonatomic methods. Zbyszek _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com