Author: dchapyshev
Date: Wed Jun 10 21:11:36 2009
New Revision: 41367
URL:
http://svn.reactos.org/svn/reactos?rev=41367&view=rev
Log:
- Set priority only if PriorityClass != PROCESS_PRIORITY_CLASS_INVALID
Modified:
trunk/reactos/dll/win32/kernel32/process/procsup.c
Modified: trunk/reactos/dll/win32/kernel32/process/procsup.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/kernel32/process…
==============================================================================
--- trunk/reactos/dll/win32/kernel32/process/procsup.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/kernel32/process/procsup.c [iso-8859-1] Wed Jun 10 21:11:36
2009
@@ -1179,16 +1179,19 @@
goto Cleanup;
}
- /* Set new class */
- Status = NtSetInformationProcess(hProcess,
- ProcessPriorityClass,
- &PriorityClass,
- sizeof(PROCESS_PRIORITY_CLASS));
- if(!NT_SUCCESS(Status))
- {
- DPRINT1("Unable to set new process priority, status 0x%x\n", Status);
- SetLastErrorByStatus(Status);
- goto Cleanup;
+ if (PriorityClass.PriorityClass != PROCESS_PRIORITY_CLASS_INVALID)
+ {
+ /* Set new class */
+ Status = NtSetInformationProcess(hProcess,
+ ProcessPriorityClass,
+ &PriorityClass,
+ sizeof(PROCESS_PRIORITY_CLASS));
+ if(!NT_SUCCESS(Status))
+ {
+ DPRINT1("Unable to set new process priority, status 0x%x\n",
Status);
+ SetLastErrorByStatus(Status);
+ goto Cleanup;
+ }
}
/* Set Error Mode */