vncserver: refactor

This commit is contained in:
Dmitry Maksyoma 2021-08-13 00:24:30 +12:00
parent 68554d84d6
commit 9a6ea64e0f

View File

@ -335,7 +335,7 @@ sub List
foreach my $file (@filelist) {
if ($file =~ /$host:(\d+)$\.pid/) {
chop($tmp_pid = `cat $vncUserDir/$file`);
if (kill 0, $tmp_pid) {
if (&IsProcessRunning($tmp_pid)) {
print ":".$1."\t\t".`cat $vncUserDir/$file`;
} else {
unlink ($vncUserDir . "/" . $file);