[X2Go-Dev] Clean processes after x2goterminate-session

Oleksandr Shneyder o.shneyder at phoca-gmbh.de
Thu Aug 12 19:36:25 CEST 2021


Why we are not just saving the x2goruncommand PID in the session
directory. All spawned processes will have a  PGID identical to the PID
of x2goruncommand. In the x2goterminate-session we can terminate all
processes with PGID identical to x2goruncommand PID:

kill -- -X2GORUNCMD_PID

looks simple to me and POSIX confirm. Any objections?


regards,
Alex


Am 11.08.21 um 04:57 schrieb Mike Gabriel:
> On  Di 10 Aug 2021 18:10:41 CEST, Ulrich Sibiller wrote:
> 
>> Probably it would be best to use dbus for session termination if it is
>> running.
> 
> This could be one puzzle piece, indeed. Basically, we can kill
> x2goruncommand and then the session manager would automatically go into
> logout.
> 
> However, esp. the GTK desktops (MATE, XFCE, etc.) leave many stray
> processes around (e.g. gvfsd, colord, etc.). For these friends, some
> more intelligence is required. Might have that in the X2Go Server
> renicer code already, because Lee at those early times worked on code
> that detects the complete process tree of a running desktop session.
> 
> Nowadays, one could argue that cgroups are another and better
> alternative. But cgroups are not available on non-Linux, so maybe a
> kernel-agnostic approach is a more favourable way to go?
> 
> Mike


-- 
-----------------------------------------------------------
Oleksandr Shneyder        | Email: o.shneyder at phoca-gmbh.de
phoca GmbH                | Tel. : 0911 - 14870374 0
Schleiermacherstr. 2      | Fax. : 0911 - 14870374 9
D-90491 Nürnberg          | Mobil: 0163 - 49 64 461

Geschäftsführung: Dipl.-Inf. Oleksandr Shneyder

Amtsgericht München       | http://www.phoca-gmbh.de
HRB 196 658               | http://www.x2go.org
USt-IdNr.: DE281977973
-----------------------------------------------------------

-------------- next part --------------
A non-text attachment was scrubbed...
Name: OpenPGP_signature
Type: application/pgp-signature
Size: 840 bytes
Desc: OpenPGP digital signature
URL: <https://lists.x2go.org/pipermail/x2go-dev/attachments/20210812/7b785dca/attachment.sig>


More information about the x2go-dev mailing list