3 * smss.c - Session Manager
5 * ReactOS Operating System
7 * --------------------------------------------------------------------
9 * This software is free software; you can redistribute it and/or
10 * modify it under the terms of the GNU General Public License as
11 * published by the Free Software Foundation; either version 2 of the
12 * License, or (at your option) any later version.
14 * This software is distributed in the hope that it will be useful,
15 * but WITHOUT ANY WARRANTY; without even the implied warranty of
16 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17 * General Public License for more details.
19 * You should have received a copy of the GNU General Public License
20 * along with this software; see the file COPYING.LIB. If not, write
21 * to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge,
24 * --------------------------------------------------------------------
27 #include <rosrtl/string.h>
32 /* Native image's entry point */
35 NtProcessStartup(PPEB Peb
)
39 Status
= InitSessionManager(Children
);
40 if (!NT_SUCCESS(Status
))
43 for (i
=0; i
< (sizeof Children
/ sizeof Children
[0]); i
++)
47 NtTerminateProcess(Children
[i
],0);
50 DPRINT1("SM: Initialization failed!\n");
54 Status
= NtWaitForMultipleObjects(((LONG
) sizeof(Children
) / sizeof(HANDLE
)),
58 NULL
); /* NULL for infinite */
59 if (!NT_SUCCESS(Status
))
61 DPRINT1("SM: NtWaitForMultipleObjects failed!\n");
65 DPRINT1("SM: Process terminated!\n");
69 /* Raise a hard error (crash the system/BSOD) */
70 NtRaiseHardError(STATUS_SYSTEM_PROCESS_TERMINATED
,
73 // NtTerminateProcess(NtCurrentProcess(), 0);