Minutes of the 1st March 2021 Teleconference Austin-1107 Page 1 of 1 Submitted by Andrew Josey, The Open Group. 3rd March 2021 Attendees: Nick Stoughton, USENIX, ISO/IEC JTC 1/SC 22 OR (leaving early) Don Cragun, IEEE PASC OR Joerg Schilling Eric Blake, Red Hat, The Open Group OR Geoff Clare, The Open Group Andrew Josey, The Open Group Richard Hansen Eric Ackermann, HPI, University of Potsdam Apologies: Mark Ziegast, SHware Systems Dev. Tom Thompson, IEEE * General news None * Outstanding actions (Please note that this section has been flushed to shorten the minutes - to locate the previous set of outstanding actions, look to the minutes from 13th June 2019 and earlier) Bug 1254: "asynchronous list" description uses "command" instead of "AND-OR list" OPEN https://austingroupbugs.net/view.php?id=1254 Action: Joerg to investigate how his shell behaves. Bug 700 - Nick to raise this issue with the C committee Bug 713 - Nick to raise with the C committee. Bug 739 - Nick to raise with the C committee. * Current Business Bug 1406: clarification of SEEK_END when current pointer doesn't match buffer size OPEN https://austingroupbugs.net/view.php?id=1406 We are still waiting for input from implementations on this item before proceeding. Bug 1418: Add options to ulimit to match get/setrlimit() Accepted as Marked https://austingroupbugs.net/view.php?id=1418 This issue is tagged for Issue 8 Replace the NAME, SYNOPSIS, DESCRIPTION, OPTIONS, and OPERANDS sections on the ulimit page with: NAME ulimit -- report or set resource limits SYNOPSIS [XSI]ulimit [-H|-S] -a ulimit [-H|-S] [-c|-d|-f|-n|-s|-t|-v] [newlimit][/XSI] DESCRIPTION The ulimit utility shall report or set the resource limits in effect in the process in which it is executed. Soft limits can be changed by a process to any value that is less than or equal to the hard limit. A process can (irreversibly) lower its hard limit to any value that is greater than or equal to the soft limit. Only a process with appropriate privileges can raise a hard limit. The value unlimited for a resource shall be considered to be larger than any other limit value. When a resource has this limit value, the implementation shall not enforce limits on that resource. In locales other than the POSIX locale, ulimit may support additional non-numeric values with the same meaning as unlimited. The behavior when resource limits are exceeded shall be as described in the System Interfaces volume of POSIX.1-202x for the setrlimit() function. OPTIONS The ulimit utility shall conform to [xref to XBD 12.2], except that: The order in which options other than -H, -S, and -a are specified may be significant. Conforming applications shall specify each option separately; that is, grouping option letters (for example, -fH) need not be recognized by all implementations. The following options shall be supported: -H Report hard limit(s) or set only a hard limit. -S Report soft limit(s) or set only a soft limit. -a Report the limit value for all of the resources named below and for any implementation-specific additional resources. -c Report, or set if the newlimit operand is present, the core image size limit(s) in units of 512 bytes. [RLIMIT_CORE] -d Report, or set if the newlimit operand is present, the data segment size limit(s) in units of 1024 bytes. [RLIMIT_DATA] -f Report, or set if the newlimit operand is present, the file size limit(s) in units of 512 bytes. [RLIMIT_FSIZE] -n Report, or set if the newlimit operand is present, the limit(s) on the number of open file descriptors, given as a number one greater than the maximum value that the system assigns to a newly-created descriptor. [RLIMIT_NOFILE] -s Report, or set if the newlimit operand is present, the stack size limit(s) in units of 1024 bytes. [RLIMIT_STACK] -t Report, or set if the newlimit operand is present, the per-process CPU time limit(s) in units of seconds. [RLIMIT_CPU] -v Report, or set if the newlimit operand is present, the address space size limit(s) in units of 1024 bytes. [RLIMIT_AS] Where an option description is followed by [RLIMIT_name] it indicates which resource for the getrlimit() and setrlimit() functions, defined in the System Interfaces volume of POSIX.1-202x, the option corresponds to. If neither the -H nor -S option is specified: If the newlimit operand is present, it shall be used as the new value for both the hard and soft limits. If the newlimit operand is not present, -S shall be the default. If no options other than -H, -S, or -a are specified, the behavior shall be as if the -f option was (also) specified. If any option other than -H or -S is repeated, the behavior is unspecified. OPERANDS The following operand shall be supported: newlimit Either an integer value to use as the new limit(s) for the specified resource, in the units specified in OPTIONS, or a non-numeric string indicating no limit, as described in the DESCRIPTION section. Numerals in the range 0 to the maximum limit value supported by the implementation for any resource shall be syntactically recognized as numeric values. Replace the STDOUT section on the ulimit page with: The standard output shall be used when no newlimit operand is present. If the -a option is specified, the output written for each resource shall consist of one line that includes: A short phrase identifying the resource (for example "file size"). An indication of the units used for the resource, if the corresponding option description in OPTIONS specifies the units to be used. The ulimit option used to specify the resource. The limit value. The format used within each line is unspecified, except that the format used for the limit value shall be as described below for the case where a single limit value is written. If a single limit value is to be written; that is, the -a option is not specified and at most one option other than -H or -S is specified: If the resource being reported has a numeric limit, the limit value shall be written in the following format: "%1d\n", where is the value of the limit in the units specified in OPTIONS. If the resource being reported does not have a numeric limit, in the POSIX locale the following format shall be used: "unlimited\n" Replace the APPLICATION USAGE, EXAMPLES, and RATIONALE sections on the ulimit page with: APPLICATION USAGE Since ulimit affects the current shell execution environment, it is always provided as a shell regular built-in. If it is called with an operand in a separate utility execution environment, such as one of the following: nohup ulimit -f 10000 env ulimit -S -c 10000 it does not affect the limit(s) in the caller's environment. See also the APPLICATION USAGE for [xref to getrlimit()]. EXAMPLES Set the hard and soft file size limits to 51200 bytes: ulimit -f 100 Save and restore a soft resource limit (where X is an option letter specifying a resource): saved=$(ulimit -X) ... ulimit -X -S "$saved" Execute a utility with a CPU limit of 5 minutes (using an asynchronous subshell to ensure the limit is set in a child process): (ulimit -t 300; exec utility_name