Message333128
bpo-20104 exposed os.posix_spawn(), but not os.posix_spawnp().
os.posix_spawnp() would be useful to support executable with no directory. See bpo-35537 "use os.posix_spawn in subprocess".
I'm not sure what is the best API:
* Add os.posix_spawnp()? duplicate the documentation and some parts of the C code (but share most of the C code)
* Add a new optional parameter to os.posix_spawn()? Ideas of names: 'use_path' or 'search_executable'. Internally, the glibc uses SPAWN_XFLAGS_USE_PATH flag to distinguish posix_spawn() and posix_spawnp().
execvp() uses the PATH environment variable, or use confstr(_CS_PATH) if PATH is not set. I guess that posix_spawnp() also uses confstr(_CS_PATH) if PATH is not set.
Currently, my favorite option is to add a new optional 'use_path' parameter to the existing os.posix_spawn() function. |
|
Date |
User |
Action |
Args |
2019-01-07 00:46:11 | vstinner | set | recipients:
+ vstinner, serhiy.storchaka, pablogsal |
2019-01-07 00:46:08 | vstinner | set | messageid: <1546821968.26.0.975322975658.issue35674@roundup.psfhosted.org> |
2019-01-07 00:46:08 | vstinner | link | issue35674 messages |
2019-01-07 00:46:08 | vstinner | create | |
|