vncserver: refactor

This commit is contained in:
Dmitry Maksyoma 2021-08-01 22:37:43 +12:00
parent bc54f75226
commit 84764bac80

View File

@ -111,7 +111,7 @@ $cmd = &ConstructXvncCmd();
# Run $cmd and record the process ID.
$pidFile = "$vncUserDir/$host:$displayNumber.pid";
&StartXAndRecordPID();
&StartXvncAndRecordPID();
# Give Xvnc a chance to start up
sleep(3);
@ -924,7 +924,7 @@ sub ConstructXvncCmd {
return $cmd;
}
sub StartXAndRecordPID {
sub StartXvncAndRecordPID {
system("$cmd & echo \$! >$pidFile");
}
@ -943,7 +943,7 @@ sub IfXvncDidntStartTryFixingFontPathAndStartXvncAgain {
}
$cmd =~ s@-fp [^ ]+@@;
$cmd .= " -fp $defFontPath" if ($defFontPath);
&StartXAndRecordPID();
&StartXvncAndRecordPID();
sleep(3);
}
}