Changeset 12824
- Timestamp:
- Sep 12, 2009, 6:52:50 PM (10 years ago)
- Location:
- trunk/aux/cocotron/win32/cocotron/WaltConsole
- Files:
-
- 2 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/aux/cocotron/win32/cocotron/WaltConsole/WaltConsole.c
r12800 r12824 123 123 int APIENTRY WinMain(HINSTANCE a,HINSTANCE b,LPSTR c,int d) 124 124 { 125 HANDLE in, out, conin, conout ;126 DWORD navail, err ;125 HANDLE in, out, conin, conout, hppid; 126 DWORD navail, err, exitcode; 127 127 ULONG ppid; 128 128 HWND window; … … 151 151 ppid = getppid(); 152 152 procname = parent_process_name(ppid); 153 hppid = OpenProcess(PROCESS_QUERY_INFORMATION|SYNCHRONIZE,FALSE,ppid); 153 154 if (!procname) { 154 155 procname = "<Unknown>"; 155 156 } 156 157 sprintf(title, "WaltConsole for %s (pid 0x%x)", procname, ppid); 157 SetConsoleTitleA( 158 title); 158 SetConsoleTitleA(title); 159 159 160 160 window = GetConsoleWindow(); … … 166 166 167 167 do { 168 if (WaitForSingleObject(hppid, 0) == WAIT_OBJECT_0) { 169 break; 170 } 168 171 if (write_pipe_input_to_console(in, conout) < 0) { 169 172 break;
Note: See TracChangeset
for help on using the changeset viewer.