TheLinuxkernelprovidesthegetrlimitandsetrlimitsystemcallstogetandsetresourcelimitsperprocess.Eachresourcehasanassociatedsoftandhardlimit.Thesoftlimitisthevaluethatthekernelenforcesforthecorrespondingresource.Thehardlimitactsasaceilingforthesoftlimit:anunprivilegedprocessmayonlysetitssoftlimittoavalueintherangefrom0uptothehardlimit,and(irreversibly)loweritshardlimit.Aprivilegedprocess(onewiththeCAP_SYS_RESOURCEcapability)maymakearbitrarychangestoeitherlimitvalue.
欢迎光临 仓酷云 (http://ckuyun.com/) | Powered by Discuz! X3.2 |