Author: hbelusca Date: Tue Jan 1 02:12:19 2013 New Revision: 58073
URL: http://svn.reactos.org/svn/reactos?rev=58073&view=rev Log: [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).
Modified: branches/ros-csrss/subsystems/win32/csrsrv/thredsup.c
Modified: branches/ros-csrss/subsystems/win32/csrsrv/thredsup.c URL: http://svn.reactos.org/svn/reactos/branches/ros-csrss/subsystems/win32/csrsr... ============================================================================== --- branches/ros-csrss/subsystems/win32/csrsrv/thredsup.c [iso-8859-1] (original) +++ branches/ros-csrss/subsystems/win32/csrsrv/thredsup.c [iso-8859-1] Tue Jan 1 02:12:19 2013 @@ -579,7 +579,7 @@ }
/* 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);