Rely on CSRSS to do console handle duplication
authorGé van Geldorp <ge@gse.nl>
Sun, 4 Jan 2004 11:40:56 +0000 (11:40 +0000)
committerGé van Geldorp <ge@gse.nl>
Sun, 4 Jan 2004 11:40:56 +0000 (11:40 +0000)
svn path=/trunk/; revision=7447

reactos/lib/kernel32/process/create.c

index af7ae13..e956532 100644 (file)
@@ -1,4 +1,4 @@
-/* $Id: create.c,v 1.76 2003/12/27 23:55:02 navaraf Exp $
+/* $Id: create.c,v 1.77 2004/01/04 11:40:56 gvg Exp $
  *
  * COPYRIGHT:       See COPYING in the top level directory
  * PROJECT:         ReactOS system libraries
@@ -1114,17 +1114,6 @@ CreateProcessW
                         DUPLICATE_SAME_ACCESS);
    }
 
-   if (Ppb->hConsole)
-   {
-      Status = NtDuplicateObject (NtCurrentProcess(), 
-                        Ppb->hConsole,
-                        hProcess,
-                        &Ppb->hConsole,
-                        0,
-                        TRUE,
-                        DUPLICATE_SAME_ACCESS);
-   }
-
    /*
     * Get some information about the executable
     */
@@ -1179,10 +1168,8 @@ CreateProcessW
      {
        DbgPrint("Failed to tell csrss about new process. Expect trouble.\n");
      }
-   else if (Sii.Subsystem == IMAGE_SUBSYSTEM_WINDOWS_CUI)
-     {
-       Ppb->hConsole = CsrReply.Data.CreateProcessReply.Console;
-     }
+
+   Ppb->hConsole = CsrReply.Data.CreateProcessReply.Console;
 
    InputSet = FALSE;
    OutputSet = FALSE;