-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Usefulness of Unix.open_process_args* functions is limited by them not respecting PATH environment variable #10083
Comments
Related/duplicate of #10057. I agree that we should probably fix this. |
Wow you're fast! You managed to cross-reference them before I did :) |
xavierleroy
pushed a commit
that referenced
this issue
Dec 21, 2020
The `Unix.open_process_args*` used to treat their first arguments as a file name for the executable to be run, like `execv` does. This commit ensures that the first argument is searched in the executable path, like `execvp` does. This is a more useful behavior. Closes: #10083
dbuenzli
pushed a commit
to dbuenzli/ocaml
that referenced
this issue
Mar 25, 2021
The `Unix.open_process_args*` used to treat their first arguments as a file name for the executable to be run, like `execv` does. This commit ensures that the first argument is searched in the executable path, like `execvp` does. This is a more useful behavior. Closes: ocaml#10083
akabe
added a commit
to akabe/ocaml-jupyter
that referenced
this issue
Mar 31, 2022
akabe
added a commit
to akabe/ocaml-jupyter
that referenced
this issue
Apr 3, 2022
🐛 don't use Unix.open_process_* on 4.12 ocaml/ocaml#10083
akabe
added a commit
to akabe/ocaml-jupyter
that referenced
this issue
Apr 9, 2022
NOTE: don't use Unix.open_process_* on 4.12 ocaml/ocaml#10083
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
As an alternative to the other
Unix.open_process*
functions (that take a single string and rely onFilename.quote_command
), theseUnix.open_process_args*
functions introduced in 4.08 are nice. But crucially they don't currently respect thePATH
environment variable, limiting their usefulness.e.g. I'd expect the following to work, since
/usr/bin
is mentioned in myPATH
and the executable/usr/bin/uname
exists.But
status
isUnix.WEXITED 127
because the executable couldn't be found.I think this is beacause the implementation is using the
execv
syscall rather thanexecvp
.The text was updated successfully, but these errors were encountered: