- adapted kernel32 so that it no longer (directly) manages console
handles as wineserver handles
- console input handle object is no longer waitable (input record
synchronisation is now implemented as a simple semaphore), and removed
FD_TYPE_CONSOLE from fd types in wineserver
- console handles now always have their two lower bit set so one can
distinguish a console handle from a kernel object handle
- implemented some undocumented kernel32 console related APIs
(CloseConsoleHandle, GetConsoleInputWaitHandle, OpenConsoleW,
VerifyConsoleIoHandle, DuplicateConsoleHandle)
- allowed a few kernel32 APIs to take console pseudo-handles
(FlushFileBuffer, GetFileType, WaitFor*Object*)
- simplified the console inheritance at process creation
- in console tests, no longer create a console if one already exists
diff --git a/server/process.c b/server/process.c
index 0617bb5..3e6e947 100644
--- a/server/process.c
+++ b/server/process.c
@@ -221,40 +221,11 @@
}
if (info)
{
- if (!info->inherit_all && !info->use_handles)
- {
- /* duplicate the handle from the parent into this process */
- reply->hstdin = duplicate_handle( parent_thread->process, info->hstdin, process,
- 0, TRUE, DUPLICATE_SAME_ACCESS );
- reply->hstdout = duplicate_handle( parent_thread->process, info->hstdout, process,
- 0, TRUE, DUPLICATE_SAME_ACCESS );
- reply->hstderr = duplicate_handle( parent_thread->process, info->hstderr, process,
- 0, TRUE, DUPLICATE_SAME_ACCESS );
- }
- else
- {
- reply->hstdin = info->hstdin;
- reply->hstdout = info->hstdout;
- reply->hstderr = info->hstderr;
- }
+ reply->hstdin = info->hstdin;
+ reply->hstdout = info->hstdout;
+ reply->hstderr = info->hstderr;
}
- else
- {
- if (process->console)
- {
- reply->hstdin = alloc_handle( process, process->console,
- GENERIC_READ | GENERIC_WRITE | SYNCHRONIZE, 1 );
- reply->hstdout = alloc_handle( process, process->console->active,
- GENERIC_READ | GENERIC_WRITE, 1 );
- reply->hstderr = alloc_handle( process, process->console->active,
- GENERIC_READ | GENERIC_WRITE, 1 );
- }
- else
- {
- /* no parent, let the caller decide what to do */
- reply->hstdin = reply->hstdout = reply->hstderr = 0;
- }
- }
+ else reply->hstdin = reply->hstdout = reply->hstderr = 0;
/* some handles above may have been invalid; this is not an error */
if (get_error() == STATUS_INVALID_HANDLE) clear_error();
return 1;