Update CreatePseudoConsole documentation to mention the Console Host#348
Update CreatePseudoConsole documentation to mention the Console Host#348logiclrd wants to merge 2 commits intoMicrosoftDocs:mainfrom
Conversation
…aborating on how the Console Host process is launched by CreatePseudoConsole and can be inadvertently isolated from console applications by CreateProcess flags.
|
When I was writing code recently that used this function, I ran into exactly this issue, and it took a fair bit of time and a Q&A discussion to understand what I was doing wrong. This paragraph would have saved me probably 5 hours. 🙂 |
|
Learn Build status updates of commit 888d69d:
|
| File | Status | Preview URL | Details |
|---|---|---|---|
| docs/createpseudoconsole.md | View | Details |
docs/createpseudoconsole.md
- Line 77, Column 527: [Warning: hard-coded-locale - See documentation]
Link 'https://learn.microsoft.com/en-us/windows/win32/procthread/process-creation-flags#CREATE_NEW_PROCESS_GROUP' contains locale code 'en-us'. For localizability, remove 'en-us' from links to most Microsoft sites. - Line 77, Column 527: [Suggestion: docs-link-absolute - See documentation]
Absolute link 'https://learn.microsoft.com/en-us/windows/win32/procthread/process-creation-flags#CREATE_NEW_PROCESS_GROUP' will be broken in isolated environments. Replace with a relative link.
For more details, please refer to the build report.
Note: Your PR may contain errors or warnings or suggestions unrelated to the files you changed. This happens when external dependencies like GitHub alias, Microsoft alias, cross repo links are updated. Please use these instructions to resolve them.
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
I see the linter warning. I can't view the documentation because it's internal to the Microsoft organization, but based on it I looked for other cross-area links in the Console-Docs repository and made mine look the same. Hopefully I did it right. 🙂 |
|
Learn Build status updates of commit 16d77ac: ✅ Validation status: passed
For more details, please refer to the build report. |
PoliCheck Scan ReportThe following report lists PoliCheck issues in PR files. Before you merge the PR, you must fix all severity-1 and severity-2 issues. The AI Review Details column lists suggestions for either removing or replacing the terms. If you find a false positive result, mention it in a PR comment and include this text: #policheck-false-positive. This feedback helps reduce false positives in future scans. ✅ No issues foundMore information about PoliCheckInformation: PoliCheck | Severity Guidance | Term |
|
thank you for documenting this! it's news to us too :) |
|
I have approved this PR under the assumption that you've done your due diligence narrowing this problem down to passing However, this is not intended to be an issue, as Dustin said. If you'd be willing to post a tiny repro to https://github.com/microsoft/terminal we could investigate this further. (It would be entirely acceptable even if you just AI vibe code some C/C++ test code.) |
|
I initially encountered this issue because in my application, which presents a terminal, if I ran Immediately after posting the question, an AI response was posted that was 100% factually incorrect. It stated very authoritatively that In response to the question, another user did some experimentation, adapting the https://github.com/logiclrd/CtrlCRepro/ The initial version of this reproduction only had one button. When clicked, it launched I got a reply back to see what happened if I removed I looked in more detail at the code, eventually writing up notes on the call sequences involved in input processing and ^C dispatch, which I have stashed in a file in another project: https://github.com/logiclrd/QBX/blob/main/References/ConPTY%20control%20key%20processing.txt In the course of my investigation, I tried a number of variations on the relative arrangements of processes and how exactly characters were sent/signals were raised (including calling the internal system function I just made an update to the repro application to make it easier to compare with & without With this, it is very easy to switch back and forth and observe the difference in Confusingly, though, I will see if I can resume the discussion on the Q&A and see if anyone can explain the difference between |
lhecker
left a comment
There was a problem hiding this comment.
I'll retract my approval until I (or someone else) had a look at the repro.
|
Okay upon further investigation, it appears what's going on is that Sources of these observations:
|
This PR adds a paragraph to the
CreatePseudoConsoledocumentation that clarifies that this API function creates a process, and that it is possible to inadvertently isolate console applications from that process, interfering with signalling.