matt335672 0bef23f217 Fix session list processing
The get_sorted_session_displays() is broken in that it
doesn't produce a sorted list of displays.

The problem is the qsort comparison function which has 2 errors in 4 lines:-
1) The test is the wrong way round (i.e. arg1 < arg2 produces a +ve
   result instead of -ve)
2) Subtracting two unsigned ints in C will never return < 0

The broken function has been masked by other display checks which mean
that it is only visible in a few situations:-
1) Starting two sessions very closely to each other may allocate the
   same display to both sessions.
2) If /tmp is namespaced, the other display checks do not work, and
   more than two sessions cannot be started.

(cherry picked from commit 70f1b685ba6a93dc3eb5f7537d933430097d6a61)
2024-06-03 09:46:31 +01:00
..
2024-05-22 09:55:01 +01:00
2024-01-11 11:16:06 +00:00
2023-10-23 18:14:46 +01:00
2023-05-02 11:55:23 +01:00
2023-05-02 11:55:23 +01:00
2024-06-03 09:46:31 +01:00
2023-05-02 11:55:23 +01:00
2023-05-02 11:55:23 +01:00
2023-05-02 11:55:23 +01:00