restricted-workers-0.1.1: Running worker processes under system resource restrictions

Safe HaskellNone




Limit settings

data LimitSettings Source

Datastructure that holds the information about restrictions and limitations for the worker process




timeout :: Int

Maximum time for which the code is allowed to run (in seconds)

niceness :: Int

Process priority for the nice syscall. -20 is the highest, 20 is the lowest

rlimits :: Maybe RLimits

Resource limits for the setrlimit syscall

chrootPath :: Maybe FilePath

The directory that the evaluator process will be chrooted into. Please note that if chroot is applied, all the pathes in EvalSettings will be calculated relatively to this value.

processUid :: Maybe UserID

The UID that will be set after the call to chroot.

secontext :: Maybe SecurityContext

SELinux security context under which the worker process will be running.

cgroupPath :: Maybe FilePath

A filepath to the tasks file for the desired cgroup.

For example, if I have mounted the cpu controller at cgroupscpu/ and I want the evaluator to be running in the cgroup idiaworkers then the cgroupPath would be cgroupscpu/idiaworkers