mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2025-02-17 10:50:47 +01:00
vncserver: refactor
This commit is contained in:
parent
3ef297a7cd
commit
ac51bd1d57
@ -373,12 +373,12 @@ sub Kill
|
|||||||
chop($pid = `cat $pidFile`);
|
chop($pid = `cat $pidFile`);
|
||||||
warn "Killing Xvnc process ID $pid\n";
|
warn "Killing Xvnc process ID $pid\n";
|
||||||
|
|
||||||
if (kill 0, $pid) {
|
if (&IsProcessRunning($pid)) {
|
||||||
system("kill $pid");
|
system("kill $pid");
|
||||||
&WaitForTimeLimitOrSubReturningTrue(1, sub {
|
&WaitForTimeLimitOrSubReturningTrue(1, sub {
|
||||||
!IsProcessRunning($pid)
|
!IsProcessRunning($pid)
|
||||||
});
|
});
|
||||||
if (kill 0, $pid) {
|
if (&IsProcessRunning($pid)) {
|
||||||
print "Xvnc seems to be deadlocked. Kill the process manually and then re-run\n";
|
print "Xvnc seems to be deadlocked. Kill the process manually and then re-run\n";
|
||||||
print " ".$0." -kill ".$opt{'-kill'}."\n";
|
print " ".$0." -kill ".$opt{'-kill'}."\n";
|
||||||
print "to clean up the socket files.\n";
|
print "to clean up the socket files.\n";
|
||||||
|
Loading…
Reference in New Issue
Block a user