This loop has potential to run infinitely if fgets() errors instead of returning something. This can happen when pms is run from X without a terminal. This results in a lot of logging to .xsession-errors.
Instead I propose to just exit if a null pointer is returned. This still allows the prompt to repeat as long as fgets() doesn't error.
This loop has potential to run infinitely if fgets() errors instead of returning something. This can happen when pms is run from X without a terminal. This results in a lot of logging to .xsession-errors.
Instead I propose to just exit if a null pointer is returned. This still allows the prompt to repeat as long as fgets() doesn't error.