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;
}
Author: aandrejevic
Date: Mon Apr 28 20:51:59 2014
New Revision: 63039
URL: http://svn.reactos.org/svn/reactos?rev=63039&view=rev
Log:
[BASESRV]
Don't update the state of the old DOS records if the DOS program executed another program.
Modified:
branches/ntvdm/subsystems/win/basesrv/vdm.c
Modified: branches/ntvdm/subsystems/win/basesrv/vdm.c
URL: http://svn.reactos.org/svn/reactos/branches/ntvdm/subsystems/win/basesrv/vd…
==============================================================================
--- branches/ntvdm/subsystems/win/basesrv/vdm.c [iso-8859-1] (original)
+++ branches/ntvdm/subsystems/win/basesrv/vdm.c [iso-8859-1] Mon Apr 28 20:51:59 2014
@@ -850,18 +850,20 @@
GetNextVdmCommandRequest->iTask = ConsoleRecord->SessionId;
GetNextVdmCommandRequest->WaitObjectForVDM = NULL;
- // HACK: I'm not sure if this should happen...
- for (i = ConsoleRecord->DosListHead.Flink; i != &ConsoleRecord->DosListHead; i = i->Flink)
- {
- DosRecord = CONTAINING_RECORD(i, VDM_DOS_RECORD, Entry);
- if (DosRecord->State == VDM_NOT_READY)
+ if (!(GetNextVdmCommandRequest->VDMState & VDM_NOT_READY))
+ {
+ for (i = ConsoleRecord->DosListHead.Flink; i != &ConsoleRecord->DosListHead; i = i->Flink)
{
- /* If NTVDM is asking for a new command, it means these are done */
- DosRecord->State = VDM_READY;
-
- NtSetEvent(DosRecord->ServerEvent, NULL);
- NtClose(DosRecord->ServerEvent);
- DosRecord->ServerEvent = NULL;
+ DosRecord = CONTAINING_RECORD(i, VDM_DOS_RECORD, Entry);
+ if (DosRecord->State == VDM_NOT_READY)
+ {
+ /* If NTVDM is asking for a new command, it means these are done */
+ DosRecord->State = VDM_READY;
+
+ NtSetEvent(DosRecord->ServerEvent, NULL);
+ NtClose(DosRecord->ServerEvent);
+ DosRecord->ServerEvent = NULL;
+ }
}
}
Author: hbelusca
Date: Mon Apr 28 20:12:07 2014
New Revision: 63037
URL: http://svn.reactos.org/svn/reactos?rev=63037&view=rev
Log:
[CMD]
GetConsoleAliasesLength returns a DWORD (and the len variable *is* a DWORD). Do not check for negative values.
Patch by André Guibert de Bruet.
CORE-7964 #resolve #comment Fixed in revision 63037, cheers!
Modified:
trunk/reactos/base/shell/cmd/alias.c
Modified: trunk/reactos/base/shell/cmd/alias.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/alias.c?rev…
==============================================================================
--- trunk/reactos/base/shell/cmd/alias.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/alias.c [iso-8859-1] Mon Apr 28 20:12:07 2014
@@ -58,7 +58,7 @@
DWORD len;
len = GetConsoleAliasesLength(_T("cmd.exe"));
- if (len <= 0)
+ if (len == 0)
return;
/* allocate memory for an extra \0 char to make parsing easier */