-
Notifications
You must be signed in to change notification settings - Fork 38
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
Skip path conversion for strace arguments #226
Comments
The commit message says that:
This means that it does not understand any Unix-like paths passed to it as arguments. For example, this invocation would not do what you think it should: $ strace /usr/bin/uname -a Because The only reason why it does work is that the MSYS2 runtime converts the arguments automatically, so that Now, why is the environment such a different beast? The reason is that |
Don't you think you should double-check this before saying it? And how exactly are you imagining it works in Cygwin?
Please read https://www.msys2.org/docs/filesystem-paths/#windows-unix-path-conversion |
I stand corrected regarding the first parameter ( I do have admit that I wrote this all from memory and did not try this out (you could, if you wanted, using
It is admittedly not documented very well, but there are environment variables that are converted from Windows to Unix paths when an MSYS program is called from a Windows program. |
Sorry, I forgot to answer that question: Cygwin plays it safe and does the double-conversion, I expect. I.e. when running |
My dude, I beg of you, please read the code. Literally just read the function name. This is the code for launching the child process. It is not modifying its own argv[0]. It does a similar conversion for handling the output file path: |
Oh right! And it also makes sense because we're looking at the Cygwin code directly, without the MSYS2-specific modifications. And Cygwin does not convert the command-line arguments, therefore its Back to your question, though, whether MSYS2's I guess, theoretically, that something like |
There is already a special case for disabling path conversion with strace in the patch series (916afdc), but it only applies to environment variables. The message on that commit seems to be acknowledging that conversion of arguments is also problematic, so I'm not sure why it doesn't disable that as well.
The text was updated successfully, but these errors were encountered: