gf3 / sandbox

A nifty JavaScript sandbox for Node.js
ISC License
844 stars 123 forks source link

CPU/mem limits on child processes #4

Open yozlet opened 13 years ago

yozlet commented 13 years ago

At the moment the sandbox run time is limited by wall clock time - would be good to find a way to limit it by more precise factors e.g. CPU clock time, memory size etc. I know very little about this stuff - any way to use POSIX setrlimit() here?

gf3 commented 13 years ago

Neat idea. I'll look into it.

bmeck commented 12 years ago

After some talk : going to create this as a 0.6.x+ feature and it will be *nix only using setrlimit. Anyone using this should be aware of older Linux kernels not handling setrlimit properly until a patch in 2008 (couldn't find direct link). This will require a C++ addon.

RobKohr commented 12 years ago

hi bmeck, did you ever get around to implementing this? It would be a super useful feature.

bmeck commented 12 years ago

I did not. Feel free to ad it if you want.