Skip to content
Snippets Groups Projects
Commit 2d27ddb0 authored by Steven Murray's avatar Steven Murray
Browse files

Revert "Removed 'Do nothing' logic from cta::server::Daemon which unwantedly...

Revert "Removed 'Do nothing' logic from cta::server::Daemon which unwantedly kicks in if systemd is used"

This reverts commit 4c7439cf.

The current pipeline in the GitLab CI keeps failing to complete
the "init" pod's work.  The same Docker image is used on
stevedevctai.cern.ch to successfully run systest.sh -n ctatest.

The GitLab CI does not provide any logs from the "init" pod and
therefore cannot be debugged.

This revert is a desperate attempt at fixing ithe problem.  If it
does work then it means the GitLab CI is benefiting from cta-taped
remaining as the root user.
parent 4c7439cf
No related branches found
No related tags found
No related merge requests found
......@@ -78,6 +78,11 @@ void cta::server::Daemon::setCommandLineHasBeenParsed(const bool foreground)
//------------------------------------------------------------------------------
void cta::server::Daemon::daemonizeIfNotRunInForegroundAndSetUserAndGroup(const std::string &userName,
const std::string &groupName) {
// Do nothing if already a daemon
if (1 == getppid()) {
return;
}
// If the daemon is to be run in the background
if (!m_foreground) {
m_log.prepareForFork();
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment