mirror of
https://github.com/reactos/reactos.git
synced 2025-02-22 08:25:03 +00:00
[NTOSKRNL] Don't hardcode flag values for DefaultHardErrorProcessing.
This commit is contained in:
parent
1fadfea053
commit
3a0ecb3dc8
2 changed files with 13 additions and 11 deletions
|
@ -150,13 +150,15 @@ ExpRaiseHardError(IN NTSTATUS ErrorStatus,
|
|||
NumberOfParameters,
|
||||
UnicodeStringParameterMask,
|
||||
Parameters,
|
||||
(PreviousMode != KernelMode) ? TRUE: FALSE);
|
||||
(PreviousMode != KernelMode) ? TRUE : FALSE);
|
||||
}
|
||||
}
|
||||
|
||||
/* Enable hard error processing if it is enabled for the process
|
||||
* or if the exception status forces it */
|
||||
if ((Process->DefaultHardErrorProcessing & 1) ||
|
||||
/*
|
||||
* Enable hard error processing if it is enabled for the process
|
||||
* or if the exception status forces it.
|
||||
*/
|
||||
if ((Process->DefaultHardErrorProcessing & SEM_FAILCRITICALERRORS) ||
|
||||
(ErrorStatus & HARDERROR_OVERRIDE_ERRORMODE))
|
||||
{
|
||||
/* Check if we have an exception port */
|
||||
|
@ -199,7 +201,7 @@ ExpRaiseHardError(IN NTSTATUS ErrorStatus,
|
|||
NumberOfParameters,
|
||||
UnicodeStringParameterMask,
|
||||
Parameters,
|
||||
(PreviousMode != KernelMode) ? TRUE: FALSE);
|
||||
(PreviousMode != KernelMode) ? TRUE : FALSE);
|
||||
|
||||
/* If we survived, return to caller */
|
||||
*Response = ResponseReturnToCaller;
|
||||
|
|
|
@ -448,15 +448,14 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
|
|||
/* Check if we have a parent */
|
||||
if (Parent)
|
||||
{
|
||||
/* Inherit PID and Hard Error Processing */
|
||||
/* Inherit PID and hard-error processing */
|
||||
Process->InheritedFromUniqueProcessId = Parent->UniqueProcessId;
|
||||
Process->DefaultHardErrorProcessing = Parent->
|
||||
DefaultHardErrorProcessing;
|
||||
Process->DefaultHardErrorProcessing = Parent->DefaultHardErrorProcessing;
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Use default hard error processing */
|
||||
Process->DefaultHardErrorProcessing = TRUE;
|
||||
/* Use default hard-error processing */
|
||||
Process->DefaultHardErrorProcessing = SEM_FAILCRITICALERRORS;
|
||||
}
|
||||
|
||||
/* Check for a section handle */
|
||||
|
@ -586,7 +585,8 @@ PspCreateProcess(OUT PHANDLE ProcessHandle,
|
|||
PROCESS_PRIORITY_NORMAL,
|
||||
Affinity,
|
||||
DirectoryTableBase,
|
||||
(BOOLEAN)(Process->DefaultHardErrorProcessing & 4));
|
||||
BooleanFlagOn(Process->DefaultHardErrorProcessing,
|
||||
SEM_NOALIGNMENTFAULTEXCEPT));
|
||||
|
||||
/* Duplicate Parent Token */
|
||||
Status = PspInitializeProcessSecurity(Process, Parent);
|
||||
|
|
Loading…
Reference in a new issue