[issue36812] posix_spawnp returns error when used with file_actions

Toshio Kuratomi report at bugs.python.org
Tue May 7 08:27:46 EDT 2019


Toshio Kuratomi <a.badger at gmail.com> added the comment:

The error message is reporting the path.  However, it is only the path component that is specified in the call to the function.  

This behaviour is not limited to the posix_spawnp() function but happens with any interface that can look up a command in the path.  For instance, here's what subprocess.Popen() gives me when I look use it against a 0644 file that is present in my PATH:

>>> subprocess.Popen(['fever.py'])
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.7/subprocess.py", line 775, in __init__
    restore_signals, start_new_session)
  File "/usr/lib64/python3.7/subprocess.py", line 1522, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
PermissionError: [Errno 13] Permission denied: 'fever.py'

----------
nosy: +a.badger

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36812>
_______________________________________


More information about the Python-bugs-list mailing list