- RootSession rootSession(server.primaryServicePort(),
- debugMode ? (sessionHasGraphicAccess | sessionHasTTY) : 0);
-
- // set up signal handlers
- if (signal(SIGCHLD, handleSIGCHLD) == SIG_ERR)
- secdebug("SS", "Cannot handle SIGCHLD: errno=%d", errno);
- if (signal(SIGINT, handleSIGOther) == SIG_ERR)
- secdebug("SS", "Cannot handle SIGINT: errno=%d", errno);
- if (signal(SIGTERM, handleSIGOther) == SIG_ERR)
- secdebug("SS", "Cannot handle SIGTERM: errno=%d", errno);
-#if !defined(NDEBUG)
- if (signal(SIGUSR1, handleSIGdebug) == SIG_ERR)
- secdebug("SS", "Cannot handle SIGHUP: errno=%d", errno);
-#endif //NDEBUG
+ RootSession rootSession(debugMode ? (sessionHasGraphicAccess | sessionHasTTY) : 0, server);
+
+ // create a monitor thread to watch for audit session events
+ AuditMonitor audits(gMainServerPort);
+ audits.run();