mirror of
https://github.com/lm-sensors/lm-sensors.git
synced 2026-11-21 19:51:45 +00:00
fancontrol: Reduce memory consumption
Construct "wait $!" causes bash to remember the exit status of the children. This consumes memory. We don't need the status code and we are only waiting for a single child, so we can simply use "wait". This will reduce the memory usage. This partly fixes ticket #2391. http://www.lm-sensors.org/ticket/2391 The actual leak is in bash 4.3 and should be fixed there.
This commit is contained in:
1 parent
59df826a29
commit
096a5fc953
2 files changed
+3
-2
No files matched your search
@@ -11,6 +11,7 @@ SVN HEAD
|
||||
sensors: Add support for temperature min and critical min hysteresis
|
||||
fancontrol: Deal with moving hwmon attributes
|
||||
Fix shell error when FCFANS is not set
|
||||
Reduce memory consumption (#2391)
|
||||
healthd: Avoid using external commands
|
||||
sensors-detect: Add detection of ADC128D818
|
||||
Add detection of AMD family 16h Kabini and Mullins
|
||||
|
||||
+2
-2
@@ -546,7 +546,7 @@ function UpdateFanSpeeds
|
||||
echo $minsa > $pwmo
|
||||
# Sleep while still handling signals
|
||||
sleep 1 &
|
||||
wait $!
|
||||
wait
|
||||
fi
|
||||
fi
|
||||
echo $pwmval > $pwmo # write new value to pwm output
|
||||
@@ -585,5 +585,5 @@ do
|
||||
UpdateFanSpeeds
|
||||
# Sleep while still handling signals
|
||||
sleep $INTERVAL &
|
||||
wait $!
|
||||
wait
|
||||
done
|
||||
Reference in new issue
Block a user