|
|
1.1 ! root 1: .TH LIMITS 2 SHARE-deprecated ! 2: .SH NAME ! 3: limits \- return or set limits structure ! 4: .SH SYNOPSIS ! 5: .B #include <sys/types.h> ! 6: .br ! 7: .B #include <sys/lnode.h> ! 8: .br ! 9: .B #include <sys/retlim.h> ! 10: .br ! 11: .B #include <sys/share.h> ! 12: .P ! 13: .B limits(address, function) ! 14: .br ! 15: .B struct lnode *address; ! 16: .br ! 17: .B int function; ! 18: .SH DESCRIPTION ! 19: This system call manipulates a kernel limits structure ! 20: according to the value of ! 21: .IR function . ! 22: Except where indicated below, ! 23: .I address ! 24: points to an ! 25: .I lnode ! 26: or an array of ! 27: .IR lnodes . ! 28: .LP ! 29: .RS 2 ! 30: .nf ! 31: .ta \w'\s-1L_DEADGROUP\s0XX'u +\w'ValueXX'u ! 32: Function Value Meaning ! 33: \s-1L_MYLIM\s0 0 Get user's own limits structure. ! 34: \s-1L_OTHLIM\s0 1 Get limits associated with uid in lnode. ! 35: \s-1L_ALLLIM\s0 2 All active limits structures are returned. ! 36: \s-1L_SETLIM\s0 3* Connect to a new limits structure. ! 37: \s-1L_DEADLIM\s0 4 Wait for dead limits belonging to child. ! 38: \s-1L_CHNGLIM\s0 5* Changes limits fields in existing limits. ! 39: \s-1L_DEADGROUP\s0 6* Pick up a dead limits structure. ! 40: \s-1L_GETCOSTS\s0 7 Get contents of system ``shconsts'' table. ! 41: \s-1L_SETCOSTS\s0 8* Set contents of system ``shconsts'' table. ! 42: \s-1L_MYKN\s0 9 Get user's own ``kern_lnode'' structure. ! 43: \s-1L_OTHKN\s0 10 Get structure associated with uid. ! 44: \s-1L_ALLKN\s0 11 All active structures are returned. ! 45: .fi ! 46: .RE ! 47: .P ! 48: The starred functions in the list are super\-user only. ! 49: .P ! 50: For ! 51: .SM L_MYKN, ! 52: .SM L_OTHKN, ! 53: and ! 54: .SM L_ALLKN ! 55: .I address ! 56: should point to a ``struct kern_lnode'' ! 57: defined in ! 58: .IR <sys/lnode.h> . ! 59: For ! 60: .SM L_SETCOSTS ! 61: and ! 62: .SM L_GETCOSTS ! 63: .I address ! 64: should point to a ``struct shconsts'' ! 65: defined in ! 66: .IR <sys/share.h> . ! 67: For ! 68: .SM L_DEADLIM ! 69: .I address ! 70: should point to a ``struct retlim'' defined in ! 71: .IR <sys/retlim.h> . ! 72: .P ! 73: .SM L_OTHLIM ! 74: and ! 75: .SM L_CHNGLIM ! 76: require that the lnode pointed to by ! 77: .I address ! 78: contains the correct uid. ! 79: .SM L_OTHKN ! 80: requires that the kern_lnode pointed to by ! 81: .I address ! 82: contains the correct uid. ! 83: .SM L_MYLIM, ! 84: .SM L_MYKN, ! 85: .SM L_OTHLIM, ! 86: and ! 87: .SM L_OTHKN ! 88: all return the number of processes currently attached to the node. ! 89: .SM L_ALLLIM ! 90: and ! 91: .SM L_ALLKN ! 92: both return the number of active nodes returned. ! 93: .P ! 94: .SM L_SETLIM ! 95: initialises a new limits structure with the passed lnode, ! 96: and attaches the calling process to it. ! 97: All children of that process will inherit the new structure. ! 98: .P ! 99: .SM L_DEADGROUP ! 100: looks for a dead limits structure, ! 101: removes it from the list of active limits, ! 102: and returns the lnode. ! 103: .P ! 104: .SM L_DEADLIM ! 105: performs a ! 106: .IR wait (2) ! 107: system call, ! 108: then returns a structure containing both the limits and process zombie structures. ! 109: The value returned is the number of processes still attached to the node. ! 110: .P ! 111: .SM L_SETCOST ! 112: and ! 113: .SM L_GETCOST ! 114: deal with the constants structure for the scheduling algorithm. ! 115: .P ! 116: Any other function is illegal, and will return an error of EINVAL. ! 117: Unless otherwise specified the ! 118: call returns the number of limits structures returned. ! 119: .SH DIAGNOSTICS ! 120: .B ESRCH ! 121: can be returned in ! 122: .I errno ! 123: by functions ! 124: .SM L_DEADGROUP, ! 125: .SM L_OTHKN, ! 126: .SM L_OTHLIM ! 127: and ! 128: .SM L_CHNGLIM ! 129: to indicate that ! 130: the desired limits structure does not exist. ! 131: .B ESRCH ! 132: can also be returned by ! 133: .SM L_SETLIM ! 134: to indicate that this lnode's group has not been set-up. ! 135: .P ! 136: .B ETOOMANYU ! 137: is returned in errno for ! 138: .SM L_SETLIM ! 139: if there is no space left in the kernel limits table. ! 140: .P ! 141: Any error causes a \-1 to be returned. ! 142: .SH "SEE ALSO" ! 143: setlimits(3), ! 144: lnode(5), ! 145: share(5).
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.