• Oran Agra's avatar
    Fix oom-score-adj-values range, abs options, and bug when used in config file (#8046) · 3ac666b3
    Oran Agra authored
    Fix: When oom-score-adj-values is provided in the config file after
    oom-score-adj yes, it'll take an immediate action, before
    readOOMScoreAdj was acquired, resulting in an error (out of range score
    due to uninitialized value. delay the reaction the real call is made by
    main().
    
    Since the values are clamped to -1000..1000, and they're
    applied as an offset from the value at startup (which may be -1000), we
    need to allow the offsets to reach to +2000 so that a value of +1000 is
    achievable in case the value at startup was -1000.
    
    Adding an option for absolute values rather than relative ones.
    
    (cherry picked from commit 61954951)
    3ac666b3
server.c 195 KB