Author: hbelusca
Date: Mon Apr 28 23:09:09 2014
New Revision: 63041
URL:
http://svn.reactos.org/svn/reactos?rev=63041&view=rev
Log:
[CSRSRV]
When the CsrProcessCreateNewGroup (~= CREATE_NEW_PROCESS_GROUP) flag is set, it means that
we are creating a new process group leader, and not the reverse :P
Modified:
branches/ntvdm/subsystems/win32/csrsrv/procsup.c
Modified: branches/ntvdm/subsystems/win32/csrsrv/procsup.c
URL:
http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/win32/csrsrv/p…
==============================================================================
--- branches/ntvdm/subsystems/win32/csrsrv/procsup.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/win32/csrsrv/procsup.c [iso-8859-1] Mon Apr 28 23:09:09
2014
@@ -605,15 +605,18 @@
}
/* Check if CreateProcess got CREATE_NEW_PROCESS_GROUP */
- if ((Flags & CsrProcessCreateNewGroup) == 0)
- {
- /* Create new data */
+ if (Flags & CsrProcessCreateNewGroup)
+ {
+ /*
+ * We create the process group leader of a new process group, therefore
+ * its process group ID and sequence number are its own ones.
+ */
CsrProcess->ProcessGroupId = HandleToUlong(ClientId->UniqueProcess);
CsrProcess->ProcessGroupSequence = CsrProcess->SequenceNumber;
}
else
{
- /* Copy it from the current process */
+ /* Inherit the process group ID and sequence number from the current process */
CsrProcess->ProcessGroupId = CurrentProcess->ProcessGroupId;
CsrProcess->ProcessGroupSequence = CurrentProcess->ProcessGroupSequence;
}