9.88 failure_policy

#define OOM_ALLOW_PROC_KILL 1

struct fail_modes {
    uint64_t oom_policy;
};

int failure_policy(struct fail_modes *old, struct fail_modes *new);

This syscall fetches and customized kernel behaviour on a series of failure conditions. old, if not null, can be used for fetching the values used at the time of calling, while new, if not null, will be used to set new values.

The valid values for oom_policy are:

OOM_ALLOW_PROC_KILL

When set, this value will make the kernel able to kill processes if deemed necessary for the prolonged function of the system, if not set, the kernel will not kill user processes at any cost.

This syscall returns 0 on success or -1 on failure, with the errno:

EFAULT

The passed buffers were pointing to invalid memory.

EACCES

When setting new values with new, the calling process did not have the capability MAC_CAP_SYSMAC.