pub fn build_cgroup_stream_script() -> StringExpand description
In-container loop of the long-lived sampler exec (issue #242): $1 is the
cgroup directory. The host paces it with one newline per interval on stdin
(docker exec -i), so it runs only shell builtins: the task’s own CPU
limit pays for no cat, sed or sleep processes. Stdin reaches EOF when
the exec’s client is gone, so the loop never outlives the sampler; dockerd
would accept its output even then. Exit 3: unreadable counters (no
delegated memory controller), which no later round can change.