Gregory P. Smith added the comment:

I think someone wanting this will need to put forward a patch adding it to be 
reviewed and mulled over.  As Alex mentioned in msg22571 - 
https://github.com/dreid/posix_spawn/ exists as does the code Danek pointed at 
in the next comment.  try those.

I suggest someone who actively cares about a limited available process address 
space environment contribute this.  (ie: not your typical 64-bit system)

fork()+exec() does not cause significant memory allocation, only a brief 
~doubling of mapped address space, with backing pages being the originals just 
marked copy on write, but never written to by the child. The exec undoes that 
mapping.

It is technically possible to cause the copy on writes to happen if you 
immediately write to a large amount of memory in the parent process after the 
fork has happened before the exec has, but that seems like a rare timing 
problem that could even be worked around by monitoring the forked child to see 
that the exec has occurred before continuing.

----------
versions: +Python 3.7 -Python 3.5

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

Reply via email to