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

when spawning a pty, be sure to provide & escape conhost's path #4172

Merged
merged 3 commits into from
Jan 11, 2020

Conversation

DHowett-MSFT
Copy link
Contributor

Fixes #4061.

I've tested this in multiple build and deployment configurations and placed a console application at C:\Program.exe

before

Terminal spawns Program.exe instead of conhost.exe, and then tries to attach CMD to it.

image

Program.exe prints out "UNICODE. ^Z TO EXIT".

after

image

Everything is good.

src/winconpty/winconpty.cpp Show resolved Hide resolved
@zadjii-msft zadjii-msft added the AutoMerge Marked for automatic merge by the bot when requirements are met label Jan 10, 2020
@ghost
Copy link

ghost commented Jan 10, 2020

Hello @zadjii-msft!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@zadjii-msft zadjii-msft added the Product-Conpty For console issues specifically related to conpty label Jan 10, 2020
@zadjii-msft
Copy link
Member

@msftbot make sure @miniksa signs off

@ghost
Copy link

ghost commented Jan 10, 2020

Hello @zadjii-msft!

Because you've given me some instructions on how to help merge this pull request, I'll be modifying my merge approach. Here's how I understand your requirements for merging this pull request:

  • I'll only merge this pull request if it's approved by @miniksa

If this doesn't seem right to you, you can tell me to cancel these instructions and use the auto-merge policy that has been configured for this repository. Try telling me "forget everything I just told you".

Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

@zadjii-msft
Copy link
Member

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@zadjii-msft
Copy link
Member

Huh, there's no reason x86 should have failed here.

/azp run

@miniksa
Copy link
Member

miniksa commented Jan 10, 2020

Huh, there's no reason x86 should have failed here.

/azp run

This is the same thing that happened to me yesterday or the day before. When I merged master INTO my branch, everything was then fine. So I just clicked the button to do that.

@DHowett-MSFT
Copy link
Contributor Author

(I'm having a look locally.)

@DHowett-MSFT
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Azure Pipelines successfully started running 1 pipeline(s).

@DHowett-MSFT
Copy link
Contributor Author

So, it's failing with 0xC0000096 STATUS_PRIVILEGED_INSTRUCTION which makes very little sense.

@DHowett-MSFT DHowett-MSFT removed the AutoMerge Marked for automatic merge by the bot when requirements are met label Jan 10, 2020
@DHowett-MSFT
Copy link
Contributor Author

Okay, so I'm force-merging this.

I pulled the test binaries from the test machine. These are the same ones that fail in CI.

Summary: Total=34950, Passed=34950, Failed=0, Blocked=0, Not Run=0, Skipped=0
...

wait what, the tests passed when i force pushed it?

@DHowett-MSFT
Copy link
Contributor Author

DHowett-MSFT commented Jan 11, 2020

the same failure is hitting intermittently on master.

@DHowett-MSFT DHowett-MSFT changed the title when spawning a ConPTY, be sure to provide & escape conhost's path when spawning a pty, be sure to provide & escape conhost's path Jan 11, 2020
@DHowett-MSFT DHowett-MSFT merged commit 2712e41 into master Jan 11, 2020
@DHowett-MSFT DHowett-MSFT deleted the dev/duhowett/program.exe branch January 11, 2020 01:48
DHowett-MSFT pushed a commit that referenced this pull request Jan 24, 2020
Fixes #4061.

Co-authored-by: Michael Niksa <miniksa@microsoft.com>
(cherry picked from commit 2712e41)
@ghost
Copy link

ghost commented Jan 27, 2020

🎉Windows Terminal Preview v0.8.10261.0 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Product-Conpty For console issues specifically related to conpty
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Terminal failed to start if "C:\Program.exe" exists
4 participants