From c61063134c53c58e1978509102d456ab93596253 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Herm=C3=A8s=20B=C3=A9lusca-Ma=C3=AFto?= Date: Tue, 1 Jan 2013 02:12:19 +0000 Subject: [PATCH] [CSRSRV] Do NOT confuse a handle and a pointer to a handle !! In this case we need a handle. Caught in the following situation : 1- Launch a process A which initializes a console A (say, cmd.exe). 2- Launch a process B which also initializes a console B (for instance, in the first cmd.exe, do: start cmd.exe) 3- Click on the "Close" button (the "Cross" button in the right upper side) of the windows of the console A. 4- Notice that the console B closes but the process B remains alive, whereas the console A remains open but the process A is killed... (contrary to what you expected, closing the console A and the process A) (when clicking on the "Close" button, the Console Server launches a remote thread in the context of the target process, and it appeared in the described situation that it was the wrong process, because of bad parameter passing to the sub-function CsrLockProcessByClientId called when creating the remote thread). svn path=/branches/ros-csrss/; revision=58073 --- subsystems/win32/csrsrv/thredsup.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsystems/win32/csrsrv/thredsup.c b/subsystems/win32/csrsrv/thredsup.c index 61a572ef4bb..2dc9df00d61 100644 --- a/subsystems/win32/csrsrv/thredsup.c +++ b/subsystems/win32/csrsrv/thredsup.c @@ -579,7 +579,7 @@ CsrCreateRemoteThread(IN HANDLE hThread, } /* Lock the Owner Process */ - Status = CsrLockProcessByClientId(&ClientId->UniqueProcess, &CsrProcess); + Status = CsrLockProcessByClientId(ClientId->UniqueProcess, &CsrProcess); if (!NT_SUCCESS(Status)) { DPRINT1("No known process for %lx\n", ClientId->UniqueProcess); -- 2.17.1