FeralInteractive / gamemode

Optimise Linux system performance on demand
BSD 3-Clause "New" or "Revised" License
4.67k stars 184 forks source link

gamemodelist: Fix unreadable process maps #463

Closed ReillyBrogan closed 5 months ago

ReillyBrogan commented 6 months ago

Systemd commit bf1b9ae487b65b1cb1639b222724fab95e508cf5 (present in Systemd v254 and later) effectively broke gamemodelist as the process map for the systemd --user process became unreadable. After this change gamemodelist would exit with an error like the following:

awk: fatal: cannot open file `/proc/2281/maps' for reading: Permission denied

To work around this let's add a hook to the awk statement to skip any files that can't be read.

Closes FeralInteractive/gamemode#456