Author: pschweitzer
Date: Sun Nov 20 18:39:17 2016
New Revision: 73325
URL: http://svn.reactos.org/svn/reactos?rev=73325&view=rev
Log:
[NTOSKRNL]
When creating a new VACB, compare file offset to section size and not to file size.
This fixes regression from r73199 where file size isn't changed anylonger, but section size is.
CORE-12430
ROSTESTS-248
Modified:
trunk/reactos/ntoskrnl/cc/view.c
Modified: trunk/reactos/ntoskrnl/cc/view.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/cc/view.c?rev=733…
==============================================================================
--- trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/cc/view.c [iso-8859-1] Sun Nov 20 18:39:17 2016
@@ -646,7 +646,7 @@
DPRINT("CcRosCreateVacb()\n");
- if (FileOffset >= SharedCacheMap->FileSize.QuadPart)
+ if (FileOffset >= SharedCacheMap->SectionSize.QuadPart)
{
*Vacb = NULL;
return STATUS_INVALID_PARAMETER;
Author: mjansen
Date: Fri Nov 18 19:53:40 2016
New Revision: 73321
URL: http://svn.reactos.org/svn/reactos?rev=73321&view=rev
Log:
[CMD] Wait for commands to exit when run with /C or /K. CORE-12402 #resolve
Modified:
trunk/reactos/base/shell/cmd/cmd.c
Modified: trunk/reactos/base/shell/cmd/cmd.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/base/shell/cmd/cmd.c?rev=7…
==============================================================================
--- trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] (original)
+++ trunk/reactos/base/shell/cmd/cmd.c [iso-8859-1] Fri Nov 18 19:53:40 2016
@@ -157,6 +157,7 @@
BOOL bCanExit = TRUE; /* indicates if this shell is exitable */
BOOL bCtrlBreak = FALSE; /* Ctrl-Break or Ctrl-C hit */
BOOL bIgnoreEcho = FALSE; /* Set this to TRUE to prevent a newline, when executing a command */
+static BOOL bWaitForCommand = FALSE; /* When we are executing something passed on the commandline after /c or /k */
INT nErrorLevel = 0; /* Errorlevel of last launched external program */
CRITICAL_SECTION ChildProcessRunningLock;
BOOL bUnicodeOutput = FALSE;
@@ -442,7 +443,7 @@
if (prci.hProcess != NULL)
{
- if (bc != NULL || IsConsoleProcess(prci.hProcess))
+ if (bc != NULL || bWaitForCommand || IsConsoleProcess(prci.hProcess))
{
/* when processing a batch file or starting console processes: execute synchronously */
EnterCriticalSection(&ChildProcessRunningLock);
@@ -1761,7 +1762,9 @@
{
/* Do the /C or /K command */
GetCmdLineCommand(commandline, &ptr[2], AlwaysStrip);
+ bWaitForCommand = TRUE;
nExitCode = ParseCommandLine(commandline);
+ bWaitForCommand = FALSE;
if (option != _T('K'))
{
nErrorLevel = nExitCode;