13 Commits

Author SHA1 Message Date
Matthias Gerstner
78c2ced7d7 external-helper: improve run_external_process() robustness
run_external_process() contained pipe file descriptors leaks (e.g. one
pipe end was never closed). Also the stdout might have been captured
incomplete, since only a single read() was performed on the pipe.
Furthermore should a child process try to write a larger amount of data
onto the pipe then it will become stuck, because the parent process
isn't consuming the data. Thus the timeout would trigger in these cases
although the child process does nothing wrong.

This commit changes the implementation to follow a select() based
approach that continually reads from the pipe, but discards data that
doesn't fit in the provided buffer.
2019-04-04 13:19:22 +02:00
Christian Kellner
45ba5bc4c4 Use matching signedness in format strings
Either cast the variable or change the format string to match the
signedness.
2019-03-28 11:40:40 +00:00
Alex Smith
10a31f8dec Update copyright years to 2019 2019-03-14 16:59:30 +00:00
Alex Smith
c49cd45e01 Ensure that we null terminate the process output buffer in run_external_process 2019-03-10 10:51:15 +00:00
Alex Smith
8bb7c901de Fix typo (default_timout -> default_timeout) 2019-03-10 10:47:17 +00:00
Marc Di Luzio
b6da948ca2 Add the output to the log for external processes that have failed 2019-03-07 17:51:57 +00:00
Marc Di Luzio
53d1700a68 Add the timout to the call signature of run_external_process 2019-03-07 17:51:57 +00:00
Marc Di Luzio
4578af47ba Combine the two run_external_process functions so they both have the same timeout protection 2019-03-07 17:51:57 +00:00
Marc Di Luzio
e9ff2cbb10 Implement a timeout in run_external_process 2019-03-07 17:51:57 +00:00
Marc Di Luzio
e31a811946 Add run_external_process_get_output function to get output as well 2019-02-20 17:53:13 +00:00
Marc Di Luzio
d00a9997f1 Correct log message 2019-02-12 08:55:23 +00:00
Marc Di Luzio
f5e7fa3222 Set up overclocking calls on NVidia
These require the coolbits plugin to be activated on nvidia-xsettings
2019-02-12 08:55:23 +00:00
Marc Di Luzio
a395caeb48 Refactor the governor request into an external process helper function 2019-02-12 08:55:23 +00:00