Changeset 12824


Ignore:
Timestamp:
Sep 12, 2009, 6:52:50 PM (10 years ago)
Author:
gb
Message:

moved here

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  
    123123int APIENTRY WinMain(HINSTANCE a,HINSTANCE b,LPSTR c,int d)
    124124{
    125   HANDLE in, out, conin, conout;
    126   DWORD navail, err;
     125  HANDLE in, out, conin, conout, hppid;
     126  DWORD navail, err, exitcode;
    127127  ULONG ppid;
    128128  HWND window;
     
    151151  ppid = getppid();
    152152  procname = parent_process_name(ppid);
     153  hppid = OpenProcess(PROCESS_QUERY_INFORMATION|SYNCHRONIZE,FALSE,ppid);
    153154  if (!procname) {
    154155    procname = "<Unknown>";
    155156  }
    156157  sprintf(title, "WaltConsole for %s (pid 0x%x)", procname, ppid);
    157   SetConsoleTitleA(
    158 title);
     158  SetConsoleTitleA(title);
    159159
    160160  window = GetConsoleWindow();
     
    166166
    167167  do {
     168    if (WaitForSingleObject(hppid, 0) == WAIT_OBJECT_0) {
     169      break;
     170    }
    168171    if (write_pipe_input_to_console(in, conout) < 0) {
    169172      break;
Note: See TracChangeset for help on using the changeset viewer.