2 * PROJECT: ReactOS Client Server Runtime SubSystem (CSRSS)
3 * LICENSE: BSD - See COPYING.ARM in root directory
4 * FILE: subsystems/win32/csrss/csrss.c
5 * PURPOSE: Main Executable Code
6 * PROGRAMMERS: Alex Ionescu
7 * ReactOS Portable Systems Group
10 /* INCLUDES *******************************************************************/
12 #define WIN32_NO_STATUS
14 #include <ndk/ntndk.h>
19 /* FUNCTIONS ******************************************************************/
23 CsrpSetDefaultProcessHardErrorMode(VOID
)
25 ULONG DefaultHardErrorMode
= 0;
27 /* Disable hard errors */
28 NtSetInformationProcess(NtCurrentProcess(),
29 ProcessDefaultHardErrorMode
,
30 &DefaultHardErrorMode
,
31 sizeof(DefaultHardErrorMode
));
41 KPRIORITY BasePriority
= (8 + 1) + 4;
44 /* Set the Priority */
45 NtSetInformationProcess(NtCurrentProcess(),
50 /* Initialize CSR through CSRSRV */
51 Status
= CsrServerInitialization(argc
, argv
);
52 if (!NT_SUCCESS(Status
))
55 DPRINT1("CSRSS: CsrServerInitialization failed:% lx\n", Status
);
56 NtTerminateProcess(NtCurrentProcess(), Status
);
60 CsrpSetDefaultProcessHardErrorMode();
62 /* If this is Session 0, make sure killing us bugchecks the system */
63 if (!NtCurrentPeb()->SessionId
) RtlSetProcessIsCritical(TRUE
, NULL
, FALSE
);
65 /* Kill this thread. CSRSRV keeps us going */
66 NtTerminateThread (NtCurrentThread(), Status
);