Commit 9861e2d8 authored by Vitezslav Humpa's avatar Vitezslav Humpa
Browse files

headless-next: instead off 'killing' the stuck session, try to end

everything via loginctl
parent 404c1296
Pipeline #5165388 failed with stages
in 22 minutes and 39 seconds
......@@ -223,6 +223,12 @@ class DisplayManagerSession(object):
# execCodeWithEnv(drop_overview, env = os.environ)
# time.sleep(2) # time for the overview to go away
# def stop(self):
# subprocess.Popen(('sudo systemctl stop %s' % (
# self.waitForProcess('/usr/bin/%s' %, invert=True)
# subprocess.Popen('loginctl kill-user test', shell=True).wait()
# time.sleep(3) # extra safe time
def stop(self):
subprocess.Popen(('sudo service %s stop' % (
self.waitForProcess('/usr/bin/%s' %, invert=True)
......@@ -230,11 +236,10 @@ class DisplayManagerSession(object):
# did i.e. gnome-shell get stuck running?
if self.isProcessRunning(self.session_binary.split('/')[-1]):
'dogtail-run-headless-next: WARNING: %s still running, proceeding with kill -9' %
'dogtail-run-headless-next: WARNING: %s still running, proceeding with loginctl kill-user' %
('sudo pkill --signal 9 %s' % (self.session_binary.split('/')[-1])).split()).wait()
subprocess.Popen('sudo loginctl kill-user test'.split()).wait()
if self.isProcessRunning('Xorg'): # Xorgs respawns the session on F25.. xorg never should be here... kill it
print('dogtail-run-headless-next: WARNING: Xorg still running, proceeding with kill -9')
subprocess.Popen('sudo pkill --signal 9 Xorg'.split()).wait()
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment