Use numeric comparison in sort for $displaynum (#2952)
Eg in the case of sockets: - X0 - X99 - X100 X99 would be picked instead of X100.
This commit is contained in:
parent
6411130c85
commit
00912add46
|
@ -87,7 +87,7 @@ sub start_xserver {
|
||||||
|
|
||||||
# First get the last used display number, then increment it by one.
|
# First get the last used display number, then increment it by one.
|
||||||
# Effectively falls back to 1 if no X server is running.
|
# Effectively falls back to 1 if no X server is running.
|
||||||
my ($displaynum) = map { /(\d+)$/ } reverse sort glob($x_socketpath . '*');
|
my ($displaynum) = reverse sort { $a <=> $b } map{ /(\d+)$/ } glob($x_socketpath . '*');
|
||||||
$displaynum++;
|
$displaynum++;
|
||||||
|
|
||||||
say "Starting $parallel Xephyr instances, starting at :$displaynum...";
|
say "Starting $parallel Xephyr instances, starting at :$displaynum...";
|
||||||
|
|
Loading…
Reference in New Issue