STINNER Victor <vstin...@redhat.com> added the comment:

I wrote attached execv_curdir.py to check if os.execv() tries to find the 
executable in the current directory if it doesn't contain a directory: yes, it 
does.

$ python3 execv_curdir.py 
execv() searchs in the current directory

I also wrote attached subprocess_curdir.py which confirms that subprocess runs 
a program from the current directory if it exists.

$ python3 subprocess_curdir.py 
defpath = :/bin:/usr/bin
subprocess searchs in the current directory

Moreover, the current directory has the priority over /bin and /usr/bin.

----------
Added file: https://bugs.python.org/file48063/execv_curdir.py

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

Reply via email to