Message325744
I'm discussing with Pablo to see how to use posix_spawn() in the Python subprocess module. IMHO we should consider the specific case of subprocess.
What is the expected API?
kw = {}
if hasattr(os, 'POSIX_SPAWN_USEVFORK'):
kw['flags'] = os.POSIX_SPAWN_USEVFORK
posix_spawn(*args, **kw)
or
posix_spawn(*args, use_vfork=True)
or
kw = {}
if sys.platform == 'linux':
kw['use_vfork'] = True
posix_spawn(*args, **kw)
?
For example, if we consider that it's safe to use POSIX_SPAWN_USEVFORK in all cases for posix_spawn(), maybe we should not add an option at the Python level, and hardcode the POSIX_SPAWN_USEVFORK flag in the C code?
--
> if I read the code correctly POSIX_SPAWN_USEVFORK is no longer used in the implementation of posix_spawn(3))
Ok, now I'm confused: what's the point of this issue if the flag became useless? :-) |
|
Date |
User |
Action |
Args |
2018-09-19 10:53:03 | vstinner | set | recipients:
+ vstinner, gregory.p.smith, ronaldoussoren, serhiy.storchaka, pablogsal |
2018-09-19 10:53:03 | vstinner | set | messageid: <1537354383.63.0.956365154283.issue34663@psf.upfronthosting.co.za> |
2018-09-19 10:53:03 | vstinner | link | issue34663 messages |
2018-09-19 10:53:03 | vstinner | create | |
|