1/*- 2 * Copyright (c) 2013, 2015 3 * mirabilos <m@mirbsd.org> 4 * 5 * Provided that these terms and disclaimer and all copyright notices 6 * are retained or reproduced in an accompanying document, permission 7 * is granted to deal in this work without restriction, including un- 8 * limited rights to use, publicly perform, distribute, sell, modify, 9 * merge, give away, or sublicence. 10 * 11 * This work is provided "AS IS" and WITHOUT WARRANTY of any kind, to 12 * the utmost extent permitted by applicable law, neither express nor 13 * implied; without malicious intent or gross negligence. In no event 14 * may a licensor, author or contributor be held liable for indirect, 15 * direct, other damage, loss, or other issues arising in any way out 16 * of dealing in the work, even if advised of the possibility of such 17 * damage or existence of a defect, except proven that it results out 18 * of said person's immediate fault when using the work as intended. 19 */ 20 21@RLIMITS_DEFNS 22__RCSID("$MirOS: src/bin/mksh/rlimits.opt,v 1.3 2015/12/12 21:08:44 tg Exp $"); 23@RLIMITS_ITEMS 24#define FN(lname,lid,lfac,lopt) (const struct limits *)(&rlimits_ ## lid), 25@@ 26 27/* generic options for the ulimit builtin */ 28 29<a| 30<H| 31<S| 32 33/* do not use options -H, -S or -a or change the order */ 34 35>t|RLIMIT_CPU 36FN("time(cpu-seconds)", RLIMIT_CPU, 1 37 38>f|RLIMIT_FSIZE 39FN("file(blocks)", RLIMIT_FSIZE, 512 40 41>c|RLIMIT_CORE 42FN("coredump(blocks)", RLIMIT_CORE, 512 43 44>d|RLIMIT_DATA 45FN("data(KiB)", RLIMIT_DATA, 1024 46 47>s|RLIMIT_STACK 48FN("stack(KiB)", RLIMIT_STACK, 1024 49 50>l|RLIMIT_MEMLOCK 51FN("lockedmem(KiB)", RLIMIT_MEMLOCK, 1024 52 53>n|RLIMIT_NOFILE 54FN("nofiles(descriptors)", RLIMIT_NOFILE, 1 55 56>p|RLIMIT_NPROC 57FN("processes", RLIMIT_NPROC, 1 58 59>w|RLIMIT_SWAP 60FN("swap(KiB)", RLIMIT_SWAP, 1024 61 62>T|RLIMIT_TIME 63FN("humantime(seconds)", RLIMIT_TIME, 1 64 65>V|RLIMIT_NOVMON 66FN("vnodemonitors", RLIMIT_NOVMON, 1 67 68>i|RLIMIT_SIGPENDING 69FN("sigpending", RLIMIT_SIGPENDING, 1 70 71>q|RLIMIT_MSGQUEUE 72FN("msgqueue(bytes)", RLIMIT_MSGQUEUE, 1 73 74>M|RLIMIT_AIO_MEM 75FN("AIOlockedmem(KiB)", RLIMIT_AIO_MEM, 1024 76 77>O|RLIMIT_AIO_OPS 78FN("AIOoperations", RLIMIT_AIO_OPS, 1 79 80>C|RLIMIT_TCACHE 81FN("cachedthreads", RLIMIT_TCACHE, 1 82 83>B|RLIMIT_SBSIZE 84FN("sockbufsiz(KiB)", RLIMIT_SBSIZE, 1024 85 86>P|RLIMIT_PTHREAD 87FN("threadsperprocess", RLIMIT_PTHREAD, 1 88 89>e|RLIMIT_NICE 90FN("maxnice", RLIMIT_NICE, 1 91 92>r|RLIMIT_RTPRIO 93FN("maxrtprio", RLIMIT_RTPRIO, 1 94 95>m|ULIMIT_M_IS_RSS 96FN("resident-set(KiB)", RLIMIT_RSS, 1024 97>m|ULIMIT_M_IS_VMEM 98FN("memory(KiB)", RLIMIT_VMEM, 1024 99 100>v|ULIMIT_V_IS_VMEM 101FN("virtual-memory(KiB)", RLIMIT_VMEM, 1024 102>v|ULIMIT_V_IS_AS 103FN("address-space(KiB)", RLIMIT_AS, 1024 104 105|RLIMITS_OPTCS 106