Skip to content

Commit 47fb40b

Browse files
committed
Merged branch develop into master
2 parents 9175956 + e8ca450 commit 47fb40b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/script/print3d-new-device.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ for DEV in $(ls /dev/ttyACM* /dev/ttyUSB*); do
1818
if [ ! -S $SOCKET ]; then
1919
$PRINT3D_RUNNER ${DEVBASE} &
2020
#disown $!
21+
# Make sure that print3d-runner and childs are never killed by the OOM-killer
22+
# oom_adj can range from -16 to +15 with -17 being a special oom_disabled value.
23+
# oom_score_adj is more modern and can range from -1000 to +1000. It does not have a oom killer disabled but with -1000 (added to the badness score) there is a very very slim change that the oom killer can kill it
24+
# See http://zurlinux.com/?p=2147 The lowest possible value, -1000, is equivalent to disabling oom killing entirely for that task since it will always report a badness score of 0.
25+
(echo -1000 > /proc/$!/oom_score_adj)
2126
sleep 2
2227
fi
2328
done

0 commit comments

Comments
 (0)