Skip to main content

prlimit

Function prlimit 

Source
pub fn prlimit(
    pid: Option<Pid>,
    resource: Resource,
    new_limit: Option<Rlimit>,
) -> Result<Rlimit, Errno>
Expand description

prlimit64 : lit et/ou modifie atomiquement la Rlimit d’un processus.

pid = None désigne le processus courant. Retourne toujours la limite avant modification (équivalent kernel “old_limit”).

§Errors

  • [Errno::EINVAL] : valeurs incohérentes.
  • [Errno::EPERM] : tentative de relever la hard limit sans CAP_SYS_RESOURCE, ou ciblage d’un autre processus sans droits.
  • [Errno::ESRCH] : pid n’existe pas.