Skip to content

Instantly share code, notes, and snippets.

@koron koron/wrap-limit-v
Last active Jan 18, 2020

What would you like to do?
apply cgroup memory limitation as `ulimit -v` virtual memory limitation
set -eu
if [ -r "$cgroup_rsslimit" ] ; then
rsslimit=`cat "$cgroup_rsslimit"`
vszlimit=`expr $rsslimit / 1024`
ulimit -v $vszlimit
exec "$@"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.