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

Update unix-adapter/main.cc #6

Closed
wants to merge 1 commit into from
Closed

Update unix-adapter/main.cc #6

wants to merge 1 commit into from

Conversation

faramir
Copy link

@faramir faramir commented Dec 2, 2012

Running console.exe ./test.exe doesn't execute test.exe.
Modifying this line changes that behavior - test.exe is executed now.

Running `console.exe ./test.exe` doesn't execute test.exe.
Modifying this line changes that behavior - test.exe is executed now.
@rprichard
Copy link
Owner

FWIW, running "console.exe ./test.exe" seems to work for me. I see that cygwin_conv_path is converting ./test.exe to plain test.exe. This command is then passed to CreateProcess in winpty-agent.exe, though, which normally looks in the CWD. Unix typically doesn't look in the CWD because it's bad for security. Maybe this behavior is configurable on Windows?

Changing the cygwin_conv_path call to use an absolute path would break use cases like "console.exe foo.exe" where foo.exe is in the PATH.

Maybe console.exe ought to reuse whatever logic Cygwin/MSYS use to convert command-line arguments before calling CreateProcess.

I'll look at this more later.

@faramir
Copy link
Author

faramir commented Dec 5, 2012

I moved console.exe to /usr/bin and tried to use it. Using ./test.exe doesn't execute right executable. When I use ../test.exe fromo child folder executed right file. Converting path to absolute path fixed situation and works well in both cases.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants