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
This commit is contained in:
Hermès Bélusca-Maïto 2013-01-01 02:12:19 +00:00
parent 2e57ad7cbd
commit c61063134c

View file

@ -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);