Cap.scope: def of ezx@1.11.0.0 Import: import ezx@1.11.0.0/src/share/cap.bend as Cap Lines 36-40 of ezx@1.11.0.0/src/share/cap.bend: https://jend.leeeet.dev/read.txt?path=ezx@1.11.0.0/src/share/cap.bend&start_line=36&end_line=40 import Base # the cgroup a capped run gets. `MemorySwapMax=0` matters: without it the # cgroup spills into swap and the cap stops meaning anything. def scope(+gigs: String) -> List<&2, String>: ["systemd-run", "--user", "--scope", "-q", "-p", "MemoryMax=" ++ gigs ++ "G", "-p", "MemorySwapMax=0", "nice"] Uses (3): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=List https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=String.append