Fix a couple of typos, reword a test comment, add a TODO comment.

This commit is contained in:
Ryan Prichard 2015-10-23 05:09:24 -05:00
parent 7e7b992cd6
commit 43db1ac585
2 changed files with 20 additions and 3 deletions

View File

@ -180,7 +180,7 @@ void Win32Console::write(const SmallRect &rect, const CHAR_INFO *data)
std::wstring Win32Console::title()
{
while (true) {
// Calling GetConsoleTitleW is tricky, because it's behavior changed
// Calling GetConsoleTitleW is tricky, because its behavior changed
// from XP->Vista, then again from Win7->Win8. The Vista+Win7 behavior
// is especially broken.
//

View File

@ -96,7 +96,7 @@ static void Test_CreateProcess_STARTUPINFOEX() {
auto ph4 = std::get<1>(pipe2);
// Add an extra console handle so we can verify that a child's console
// handles didn't reverted to the original default, but were inherited.
// handles didn't revert to the original default, but were inherited.
p.openConout(true);
// Verify that ntHandlePointer is working...
@ -214,7 +214,7 @@ static void Test_CreateProcess_STARTUPINFOEX() {
}
if (!isAtLeastWin8()) {
// Make a final valiant effort to test
// Make a final valiant effort to find a
// PROC_THREAD_ATTRIBUTE_HANDLE_LIST and console handle interaction.
// We'll set all the standard handles to pipes. Nevertheless, all
// console handles are inherited.
@ -386,6 +386,23 @@ static void Test_GetStdHandle_SetStdHandle() {
}
}
// MSDN's CreateProcess page currently has this note in it:
//
// Important The caller is responsible for ensuring that the standard
// handle fields in STARTUPINFO contain valid handle values. These fields
// are copied unchanged to the child process without validation, even when
// the dwFlags member specifies STARTF_USESTDHANDLES. Incorrect values can
// cause the child process to misbehave or crash. Use the Application
// Verifier runtime verification tool to detect invalid handles.
//
// XXX: The word "even" here sticks out. Verify that the standard handle
// fields in STARTUPINFO are ignored when STARTF_USESTDHANDLES is not
// specified.
void runCommonTests() {
Test_IntrinsicInheritFlags();
Test_CreateProcess_ModeCombos();