X2Go Bug report logs - #484
Daemonize with systemd needs detach_process=True

version graph

Package: x2gobroker; Maintainer for x2gobroker is X2Go Developers <x2go-dev@lists.x2go.org>; Source for x2gobroker is src:x2gobroker.

Reported by: Bengt Giger <bengt.giger@id.ethz.ch>

Date: Fri, 25 Apr 2014 13:05:02 UTC

Severity: normal

Tags: pending

Found in version 0.0.3

Fixed in version 0.0.3.0

Done: X2Go Release Manager <git-admin@x2go.org>

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit@bugs.x2go.org (full text, mbox, reply):

Received: (at submit) by bugs.x2go.org; 25 Apr 2014 13:01:51 +0000
From bengt.giger@id.ethz.ch  Fri Apr 25 15:01:50 2014
X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on
	ymir.das-netzwerkteam.de
X-Spam-Level: 
X-Spam-Status: No, score=-0.0 required=5.0 tests=BAYES_40 autolearn=ham
	version=3.3.2
X-Greylist: delayed 367 seconds by postgrey-1.34 at ymir.das-netzwertkeam.de; Fri, 25 Apr 2014 15:01:50 CEST
Received: from edge10.ethz.ch (edge10.ethz.ch [82.130.75.186])
	by ymir.das-netzwerkteam.de (Postfix) with ESMTPS id D90535DA7B
	for <submit@bugs.x2go.org>; Fri, 25 Apr 2014 15:01:50 +0200 (CEST)
Received: from CAS21.d.ethz.ch (172.31.51.111) by edge10.ethz.ch
 (82.130.75.186) with Microsoft SMTP Server (TLS) id 14.3.174.1; Fri, 25 Apr
 2014 14:55:39 +0200
Received: from ruriko.ethz.ch (129.132.179.13) by mail.ethz.ch (172.31.51.111)
 with Microsoft SMTP Server (TLS) id 14.3.174.1; Fri, 25 Apr 2014 14:55:42
 +0200
Message-ID: <535A5B4E.6040308@id.ethz.ch>
Date: Fri, 25 Apr 2014 14:55:42 +0200
From: Bengt Giger <bengt.giger@id.ethz.ch>
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.4.0
MIME-Version: 1.0
To: <submit@bugs.x2go.org>
Subject: Daemonize with systemd needs detach_process=True
Content-Type: multipart/signed; protocol="application/pkcs7-signature";
	micalg=sha1; boundary="------------ms070800010602060208000505"
X-Originating-IP: [129.132.179.13]
[Message part 1 (text/plain, inline)]
Package: x2gobroker
version: 0.0.3

When starting x2gobroker-daemon (and x2gobroker-authservice)
with systemd, the process will not fork. The command

  systemctl start x2gobroker-daemon

will start the daemon but not return to the prompt.

This is caused by the way DaemonContext() handles the
parameter detach_process:

"If unspecified (None) during initialisation of the instance,
this will be set to True by default, and False only if
detaching the process is determined to be redundant; for
example, in the case when the process was started by init,
by initd, or by inetd."

But systemd is not recognized, so detach_process defaults
to False. It has to be explicitely set to True.

I tested the behaviour on Fedora 20, and the daemons both
detach after this change.

Regards
Bengt

[smime.p7s (application/pkcs7-signature, attachment)]

Send a report that this bug log contains spam.


X2Go Developers <owner@bugs.x2go.org>. Last modified: Sat Apr 20 00:27:17 2024; Machine Name: ymir.das-netzwerkteam.de

X2Go Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.