But then it could just keep running forever which isn’t something you’d want
Re:Sandboxing JavaScript Code
by curryhoward on Thursday April 20, 2023 @04:29AM
(#35637616)
That's what (4) is for. Time out after some duration.
That's a pretty strange failure mode. Usually you'd just throttle the sandboxed application (e.g., give it a CFS quota with a CPU cgroup) or give it a limited number of vCPUs.