Fixes this warning:
```
WARNING: You should add the boolean check kwarg to the run_command call.
It currently defaults to false,
but it will default to true in future releases of meson.
See also: https://github.com/mesonbuild/meson/issues/9300
```
Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
This simple patch includes signal.h in daemon/gamemode-context.c to fix building gamemode on musl
libc.
This has been tested Gentoo musl and Alpine (also Gentoo glibc to
ensure no multiple defined symbols/other errors for glibc).
> ../daemon/gamemode-context.c: In function 'game_mode_context_auto_expire':
> ../daemon/gamemode-context.c:421:29: error: implicit declaration of function 'kill' [-Werror=implicit-function-declaration]
> 421 | if (kill(client->pid, 0) != 0) {
> | ^~~~
> ../daemon/gamemode-context.c:421:29: warning: nested extern declaration of 'kill' [-Wnested-externs]
Signed-off-by: Alfred Persson Forsberg <cat@catcream.org>
Dockerfile
----------
This dockerfile was used to emulate GitHub actions.
<details><summary>Dockerfile source (click to expand)</summary>
```dockerfile
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN set -ex; \
apt-get update; \
apt-get install -y build-essential meson appstream clang clang-format clang-tools libdbus-1-dev libinih-dev libsystemd-dev git
RUN set -ex; \
yes | adduser ci-user
USER ci-user
```
</details>
Commands to reproduce
---------------------
I simulated GitHub actions with a local docker environment.
docker build -t ci .
I ran the following commands to reproduce the issue so that I could bugfix the static analyzer script.
```bash
docker run -e CI=true --rm -v "$PWD:$PWD" -w "$PWD" --init ci ./scripts/static-analyser-check.sh
docker run -e CI=true --rm -v "$PWD:$PWD" -w "$PWD" --init ci ./bootstrap.sh -Dwith-examples=true
docker run --rm -v "$PWD:$PWD" -w "$PWD" --init ci meson test -C builddir
docker run --rm -v "$PWD:$PWD" -w "$PWD" --init ci dbus-run-session -- gamemode-simulate-game
docker run --rm -v "$PWD:$PWD" -w "$PWD" --init ci ./scripts/static-analyser-check.sh
```
All commands reuse the same workspace which is how it works in GH actions.
Legitimate bugs
---------------
Now the error displayed in build failure appears to be a legitimate bug. Four were found related to null pointer dereference. I'm not fixing the bug but the check should work properly for those who do.
If you following my docker setup in this description you can view the bug report by starting the report server.
```bash
docker run -p 127.0.0.1:8181:8181 -it --rm -v "$PWD:$PWD" -w "$PWD" --init ci scan-view --host 0.0.0.0 --allow-all-hosts builddir/meson-logs/scanbuild/*
```
After the report server is started you can visit `http://127.0.0.1:8181/` to view the bugs.
Screenshot of report
--------------------

This change fixes the format check in GitHub actions ran by `clang-format`.
Dockerfile
```dockerfile
FROM ubuntu:20.04
ENV DEBIAN_FRONTEND=noninteractive
RUN set -ex; \
apt-get update; \
apt-get install -y build-essential meson appstream clang clang-format clang-tools libdbus-1-dev libinih-dev libsystemd-dev git
RUN set -ex; \
yes | adduser ci-user
USER ci-user
```
Environment setup
```bash
sudo su -g docker $USER
docker build -t ci .
```
clang-format fix
```bash
docker run -e CI=true --rm -v "$PWD:$PWD" -w "$PWD" --init ci ./scripts/format-check.sh
```
* New utility: gamemodelist
While trying out gamemode on Ubuntu 18.04 I had trouble figuring out
whether or not my games were running with gamemode enabled. I wrote this
utility which prints all processes loaded with the gamemode shared
library.
- [x] Added utility to `data/` folder.
- [x] Update meson installer.
- [x] Included section 1 manual.
- [x] Updated README for Ubuntu 18.04 build instructions. Steam supports
Ubuntu 18.04.
I'm open to feedback and generally this should work for any distrobution
since it makes use of the Linux `/proc` filesystem. [Learn more about
`/proc`][1].
[1]: https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/Documentation/filesystems/proc.rst?h=v5.15.12
Add a trivial gamemode.conf file, which creates the gamemode group.
v2: git add gamemode.conf (d'oh)
Signed-off-by: Emil Velikov <emil.velikov@collabora.com>
Not all distributions install non-system binaries into /usr/bin. For
example, NixOS installs packages to /nix/store using a unique hash
generated from the inputs used to build it:
/nix/store/jld7jh3ilvbg91zvn1bdyawfc55b9jk8-polkit-0.118-bin/bin/pkexec