From d057840899a704974f45073f0aea30c4064fb798 Mon Sep 17 00:00:00 2001 From: "William A. Rowe Jr" Date: Wed, 27 Feb 2002 19:38:09 +0000 Subject: [PATCH] Need broader permissions if we are to read and the set the flags that apply to the console stream. git-svn-id: https://svn.apache.org/repos/asf/httpd/httpd/trunk@93604 13f79535-47bb-0310-9956-ffa450edef68 --- support/win32/wintty.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/support/win32/wintty.c b/support/win32/wintty.c index acdde94b6da..26a827b2d5f 100644 --- a/support/win32/wintty.c +++ b/support/win32/wintty.c @@ -265,7 +265,7 @@ int main(int argc, char** argv) printerr("SetConsoleTitle() failed (%d)\n", GetLastError()); } - conout = CreateFile("CONOUT$", GENERIC_WRITE, + conout = CreateFile("CONOUT$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, FALSE, OPEN_EXISTING, 0, NULL); if (!conout || conout == INVALID_HANDLE_VALUE) { @@ -281,14 +281,14 @@ int main(int argc, char** argv) printerr("SetConsoleMode(CONOUT, 0x%x) failed (%d)\n", conmode, GetLastError()); } - conin = CreateFile("CONIN$", GENERIC_READ, + conin = CreateFile("CONIN$", GENERIC_READ | GENERIC_WRITE, FILE_SHARE_READ | FILE_SHARE_WRITE, FALSE, OPEN_EXISTING, 0, NULL); if (!conin || conin == INVALID_HANDLE_VALUE) { printerr("GetStdHandle(STD_INPUT_HANDLE) failed (%d)\n", GetLastError()); } else if (!GetConsoleMode(conin, &conmode)) { - printerr("GetConsoleMode(CONOUT) failed (%d)\n", GetLastError()); + printerr("GetConsoleMode(CONIN) failed (%d)\n", GetLastError()); } else if (!SetConsoleMode(conin, conmode = ((conmode | newinmode) & ~notinmode))) { printerr("SetConsoleMode(CONIN, 0x%x) failed (%d)\n", conmode, GetLastError()); -- 2.47.2