Commit 95202ea4 authored by Eric Pouech's avatar Eric Pouech Committed by Alexandre Julliard

server: Use negative values for console pseudo handles.

parent b4d91adb
......@@ -188,8 +188,8 @@ struct condrv_ctrl_event
};
/* Wine specific values for console inheritance (params->ConsoleHandle) */
#define CONSOLE_HANDLE_ALLOC UlongToHandle(1)
#define CONSOLE_HANDLE_ALLOC_NO_WINDOW UlongToHandle(2)
#define CONSOLE_HANDLE_SHELL UlongToHandle(3)
#define CONSOLE_HANDLE_ALLOC LongToHandle(-1)
#define CONSOLE_HANDLE_ALLOC_NO_WINDOW LongToHandle(-2)
#define CONSOLE_HANDLE_SHELL LongToHandle(-3)
#endif /* _INC_CONDRV */
......@@ -1333,8 +1333,8 @@ DECL_HANDLER(new_process)
/* connect to the window station */
connect_process_winstation( process, parent_thread, parent );
/* set the process console */
if (info->data->console > 3)
/* inherit the process console, but keep pseudo handles (< 0), and 0 (= not attached to a console) as is */
if ((int)info->data->console > 0)
info->data->console = duplicate_handle( parent, info->data->console, process,
0, 0, DUPLICATE_SAME_ACCESS );
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment