#!/bin/bash # equivalent of systemd OOMScoreAdjust=1000: make this process (and children) the first OOM victim echo 1000 > /proc/self/oom_score_adj exec "$@"