Skip to content
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

procToArgv calls doesFileExist instead of checking for a slash #37

Open
kirelagin opened this issue Jun 16, 2019 · 0 comments
Open

procToArgv calls doesFileExist instead of checking for a slash #37

kirelagin opened this issue Jun 16, 2019 · 0 comments
Labels
enhancement New feature or request

Comments

@kirelagin
Copy link
Contributor

execvp work by checking for a slash in the path; if there is a slash, it assumes it is a path (absolute or relative), if there is no slash, it looks it up in PATH.

Therefore the current behaviour of procToArgv can be unexpected in that if you run echo while having a file called echo in current directory, it will run your file, while execvp will resolve it through PATH.

Open question: will execv accept a relative path? If it will, the fix is easy, if it will not, we’ll also have to resolve relative paths.

@qrilka qrilka added the enhancement New feature or request label Jun 14, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants