mrchrisster / MiSTer_SAM

154 stars 23 forks source link

Fix cleanup code for inotifywait. #99

Closed InquisitiveCoder closed 2 years ago

InquisitiveCoder commented 2 years ago

The code responsible for finding the PID of inotifywait isn't working. My guess is MiSTer changed its ps implementation at some point and the current version of ps has a different output format from when this code was written. The current ps version tries to align its output using multiple spaces, which makes cut impractical.

The new code specifies the output columns for ps and uses read's built-in word splitting to parse the PID. Hopefully this'll be more resilient to formatting changes.

mrchrisster commented 2 years ago

Thank you for your contribution! I'm not near my Mister and can't check your code right now but I trust you on this one ;)