STINNER Victor <[email protected]> added the comment:
IMO the fix is simple: only create OSError from the errno, never pass a
filename.
posix_spawn() is really complex function which can fail in many different ways.
Only in some very specific cases the filename is correct.
"""
ERRORS
The posix_spawn() and posix_spawnp() functions fail only in the
case where the underlying fork(2), vfork(2) or clone(2) call
fails; in these cases, these functions return an error number,
which will be one of the errors described for fork(2), vfork(2)
or clone(2).
In addition, these functions fail if:
ENOSYS Function not supported on this system.
"""
https://man7.org/linux/man-pages/man3/posix_spawn.3.html
Hum. I'm not sure that manual page is up to date. In the glic, it can also
report exec() failure using a pipe, if I recall correctly.
----------
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43113>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com