Christian Heimes added the comment: which('sh') isn't correct here. 'which' searches in all PATH environ parts. However the shell must be looked up in CS_PATH only.
>From man sh(1posix): > Applications should note that the standard PATH to the shell cannot be > assumed to be either /bin/sh or /usr/bin/sh, and should be determined by > interrogation of the PATH returned by getconf PATH , ensuring that the > returned pathname is an absolute pathname and not a shell built-in. 'getconf PATH' queries confstr(_CS_PATH). I suggest that you modify the POSIX part to: path = os.confstr("CS_PATH") which('sh', path=path) ---------- nosy: +christian.heimes _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue16353> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com