Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix session list processing #3103

Merged
merged 1 commit into from
Jun 3, 2024

Commits on Jun 1, 2024

  1. 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.
    matt335672 committed Jun 1, 2024
    Configuration menu
    Copy the full SHA
    70f1b68 View commit details
    Browse the repository at this point in the history