donotturnoff / aerend

My third year project
0 stars 0 forks source link

Prevent starvation on program halt when run as root #70

Closed donotturnoff closed 2 years ago

donotturnoff commented 2 years ago

If the program isn't run as root, it can never terminate as the event loop threads get stuck waiting for input from devices they cannot read. This can be fixed by either preventing running as non-root, or by (preferably), finding some way to read events without being root.

donotturnoff commented 2 years ago

Add user to correct group to read input files, otherwise the program will throw exceptions when loading input devices, thus preventing starvation later.

donotturnoff commented 2 years ago

In the future I should allow the program to run and shut down correctly with no input devices at all.

donotturnoff commented 2 years ago

The program no longer freezes when run without correct permissions, and can be terminated gracefully.