Reinserts original comments

This commit is contained in:
torsten committed 2026-10-14 12:56:16 +00:00
1 parent 1dd1e86355
commit b662e4daf9
112 files changed
+7113 -5131

No files matched your search

@@ -1,18 +1,24 @@
// **************************************************************************
//
// (C) Copyright 2009 Swiss SIMTEC AG
//
// **************************************************************************
//
// $HeadURL$
// $LastChangedBy$
// $LastChangedDate$
// $LastChangedRevision$
//
// **************************************************************************
/*!
*
* \page Tetra-Interface Tetra-Interface
*
* This component is needed to communicate between the Server software and the players in
* the field via Tetra. It's an extra component due to historical reasons only.
*
*/
#include "PrtCnvApplication.hpp"
#include <NGLLogger/INGLLogger.h>
@@ -25,41 +31,41 @@
#include <unistd.h>
#endif
// ---------------------------------------------------------------
// Become a daemon
// ---------------------------------------------------------------
static void daemonize()
{
#ifndef WIN32
pid_t pid, sid;
/* already a daemon */
if ( getppid() == 1 )
return;
/* Fork off the parent process */
pid = fork();
if (pid < 0) {
exit(EXIT_FAILURE);
}
/* If we got a good PID, then we can exit the parent process. */
if (pid > 0) {
exit(EXIT_SUCCESS);
}
/* At this point we are executing as the child process */
/* Change the file mode mask */
umask(0);
/* Create a new SID for the child process */
sid = setsid();
if (sid < 0) {
exit(EXIT_FAILURE);
}
/* Change the current working directory. This prevents the current
directory from being locked; hence not being able to remove it. */
if ((chdir("/")) < 0) {
exit(EXIT_FAILURE);
}