Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Switch to GitLab Next
Sign in / Register
Toggle navigation
Open sidebar
dogtail
dogtail
Commits
9861e2d8
Commit
9861e2d8
authored
Nov 28, 2016
by
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
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
4 deletions
+9
-4
scripts/dogtail-run-headless-next
scripts/dogtail-run-headless-next
+9
-4
No files found.
scripts/dogtail-run-headless-next
View file @
9861e2d8
...
...
@@ -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.dm)).split()).wait()
# self.waitForProcess('/usr/bin/%s' % self.dm, 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
.
dm
)).
split
()).
wait
()
self
.
waitForProcess
(
'/usr/bin/%s'
%
self
.
dm
,
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
]):
print
(
'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
'
%
(
self
.
session_binary
.
split
(
'/'
)[
-
1
]))
subprocess
.
Popen
(
(
'sudo pkill --signal 9 %s'
%
(
self
.
session_binary
.
split
(
'/'
)[
-
1
])).
split
()).
wait
()
time
.
sleep
(
1
)
subprocess
.
Popen
(
'sudo loginctl kill-user test'
.
split
()).
wait
()
time
.
sleep
(
5
)
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
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment