mirror of
https://github.com/kasmtech/KasmVNC.git
synced 2024-11-28 02:53:41 +01:00
vncserver: extract WaitForXvncToStart()
This commit is contained in:
parent
df5d3e506d
commit
7ee1522143
@ -112,9 +112,7 @@ $cmd = &ConstructXvncCmd();
|
|||||||
# Run $cmd and record the process ID.
|
# Run $cmd and record the process ID.
|
||||||
$pidFile = "$vncUserDir/$host:$displayNumber.pid";
|
$pidFile = "$vncUserDir/$host:$displayNumber.pid";
|
||||||
&StartXvncAndRecordPID();
|
&StartXvncAndRecordPID();
|
||||||
|
&WaitForXvncToStart();
|
||||||
# Give Xvnc a chance to start up
|
|
||||||
sleep(3);
|
|
||||||
|
|
||||||
&IfXvncDidntStartTryFixingFontPathAndStartXvncAgain();
|
&IfXvncDidntStartTryFixingFontPathAndStartXvncAgain();
|
||||||
|
|
||||||
@ -939,7 +937,7 @@ sub IfXvncDidntStartTryFixingFontPathAndStartXvncAgain {
|
|||||||
$cmd =~ s@-fp [^ ]+@@;
|
$cmd =~ s@-fp [^ ]+@@;
|
||||||
$cmd .= " -fp $defFontPath" if ($defFontPath);
|
$cmd .= " -fp $defFontPath" if ($defFontPath);
|
||||||
&StartXvncAndRecordPID();
|
&StartXvncAndRecordPID();
|
||||||
sleep(3);
|
&WaitForXvncToStart();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -956,3 +954,7 @@ sub WarnUserXvncNotStartedAndExit {
|
|||||||
close(LOG);
|
close(LOG);
|
||||||
die "\n";
|
die "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
sub WaitForXvncToStart {
|
||||||
|
sleep(3);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user