New submission from Robert Merrill:

Same code but different problem as this issue: http://bugs.python.org/issue10897

The above-linked issue was closed as WONTFIX, but there is a secondary problem: 
the file descriptor that mmap.mmap() allocates is not set to close-on-exec.

This means that any process you spawn using os.system() and the like, its 
children, its children's children etc will inherit this file descriptor.

This is unexpected, unnecessary behavior, and potentially a huge pain if you 
mmap() a file and then spawn, say, inetd or something that does similar stuff, 
because now you have to kill every process that spawned from that in order to 
unmount filesystems or remove kernel modules that are being blocked as a result 
of the fds being open.

----------
components: Library (Lib)
messages: 201709
nosy: rfm
priority: normal
severity: normal
status: open
title: mmap.mmap() allocates a file descriptor that isn't CLOEXEC
type: resource usage
versions: Python 2.7

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue19444>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to