Thermald exiting because it is already running will abort via a thd_log_fatal message that triggers a SIGTRAP on a segmentation fault. This fix resolves this and thermald will exit cleanly with exit(EXIT_FAILURE) and a message without the SIGTRAP + segmentation fault.
[Test Case]
Check thermald is already running as a deamon. Next, start another instance of thermald from the command line:
sudo thermald --no-daemon --loglevel=info
Without the fix this can crash with a SIGTRAP on a segmentation fault. With the fix, thermald will report another instance of thermald is running and then cleaning exit with EXIT_FAILURE (1) exit status.
[Regression Potential]
Can't think of any, this is a one line fix that does not trip a segfault because the fix uses the correct way to log an error.
[SRU Justification] (Vivid, Trusty)
Thermald exiting because it is already running will abort via a thd_log_fatal message that triggers a SIGTRAP on a segmentation fault. This fix resolves this and thermald will exit cleanly with exit(EXIT_FAILURE) and a message without the SIGTRAP + segmentation fault.
[Test Case]
Check thermald is already running as a deamon. Next, start another instance of thermald from the command line:
sudo thermald --no-daemon --loglevel=info
Without the fix this can crash with a SIGTRAP on a segmentation fault. With the fix, thermald will report another instance of thermald is running and then cleaning exit with EXIT_FAILURE (1) exit status.
[Regression Potential]
Can't think of any, this is a one line fix that does not trip a segfault because the fix uses the correct way to log an error.