The following issue has been SUBMITTED. 
====================================================================== 
https://austingroupbugs.net/view.php?id=1669 
====================================================================== 
Reported By:                geoffclare
Assigned To:                
====================================================================== 
Project:                    Issue 8 drafts
Issue ID:                   1669
Category:                   Shell and Utilities
Type:                       Enhancement Request
Severity:                   Comment
Priority:                   normal
Status:                     New
Name:                       Geoff Clare 
Organization:               The Open Group 
User Reference:              
Section:                    ulimit 
Page Number:                3442 
Line Number:                117558 
Final Accepted Text:         
====================================================================== 
Date Submitted:             2023-04-17 14:15 UTC
Last Modified:              2023-04-17 14:15 UTC
====================================================================== 
Summary:                    Make the ulimit utility consistent with
[gs]etrlimit() wrt XSI
Description: 
In draft 3 getrlimit() and setrlimit() were moved from XSI to Base (except
for RLIMIT_CPU and RLIMIT_FSIZE).  Since the ulimit utility provides
corresponding functionality in shells, it should be made consistent with
[gs]etrlimit() as regards what features are XSI.

There is a slight complication - the file size limit is the default
resource for ulimit when no resource option is specified, and it would be
strange to have the default be XSI.  The reason RLIMIT_FSIZE is XSI is
because of the SIGXFSZ signal, so the obvious solution is to treat only the
SIGXFSZ requirements as XSI and to make the ability to (get and) set the
file size limit be a Base requirement.  This will also affect the EFBIG
errors for functions that write to files and a few other
file-size-limit-related things.

Desired Action: 
On page 398 line 13963 page <sys/resource.h>, remove XSI shading from
RLIMIT_FSIZE.

On page 507 line 17919 section 2.3 Error Numbers (EFBIG),
change:<blockquote>The size of a file would exceed the maximum file size of
an implementation or offset maximum established in the corresponding file
description.</blockquote>to:<blockquote>The size of a file would exceed the
implementation's maximum file size, the file size limit of the process, or
the offset maximum established in the corresponding open file
description.</blockquote>
On page 605 line 21517 section aio_write(), change:<blockquote>[XSI]If the
request would cause the file size to exceed the soft file size limit for
the process and there is no room for any bytes to be written, the request
shall fail and the implementation shall generate the SIGXFSZ signal for the
thread.[/XSI]</blockquote>to:<blockquote>If the request would cause the
file size to exceed the soft file size limit for the process and there is
no room for any bytes to be written, the request shall fail [XSI]and the
implementation shall generate a SIGXFSZ signal for the
thread[/XSI].</blockquote>
On page 606 line 21550 section aio_write(),
change:<blockquote>[XSI][EFBIG]<blockquote>The file is a regular file,
<i>aiobcp</i>-><i>aio_nbytes</i> is greater than 0, and there is no room
for any bytes to be written at the starting position without exceeding the
file size limit for the process. A SIGXFSZ signal shall also be sent to the
thread.[/XSI]</blockquote></blockquote>to:<blockquote>[EFBIG]<blockquote>The
file is a regular file, <i>aiobcp</i>-><i>aio_nbytes</i> is greater than 0,
and there is no room for any bytes to be written at the starting position
without exceeding the file size limit for the process. [XSI]A SIGXFSZ
signal shall also be generated for the
thread.[/XSI]</blockquote></blockquote>
On page 868 line 29616 section exec, remove XSI shading
from:<blockquote>File size limit (see <i>getrlimit</i>() and
<i>setrlimit</i>())</blockquote>
On page 868 line 29620 section exec, remove XSI shading
from:<blockquote>Resource limits</blockquote>
On page 868 line 29644 section exec, remove XSI shading
from:<blockquote>The saved resource limits in the new process image are set
to be a copy of the process' corresponding hard and soft
limits.</blockquote>
On page 896 line 30567 section fclose(), and
page 939 line 31953 section fflush(), and
page 1005 line 34499 section fputc(), and
page 1009 line 34648 section fputwc(), and
page 1042 line 35806 section fseek(), and
page 1045 line 35922 section fsetpos(),
change:<blockquote>[XSI][EFBIG]<blockquote>An attempt was made to write a
file that exceeds the file size limit of the process. A SIGXFSZ signal
shall also be sent to the
thread.[/XSI]</blockquote></blockquote>to:<blockquote>[CX][EFBIG]<blockquote>An
attempt was made to write a file that exceeds the file size limit of the
process.[/CX] [XSI]A SIGXFSZ signal shall also be generated for the
thread.[/XSI]</blockquote></blockquote>
On page 1066 line 36626 section ftruncate(), and
page 2283 line 74481 section truncate(), change:<blockquote>[XSI]If the
request would cause the file size to exceed the soft file size limit for
the process, the request shall fail and the implementation shall generate
the SIGXFSZ signal for the thread.[/XSI]</blockquote>to:<blockquote>If the
request would cause the file size to exceed the soft file size limit for
the process, the request shall fail [XSI]and the implementation shall
generate a SIGXFSZ signal for the thread[/XSI].</blockquote>
On page 1066 line 36648 section ftruncate(), and
page 2283 line 74496 section truncate(),
change:<blockquote>[XSI][EFBIG]<blockquote>The <i>length</i> argument
exceeds the file size limit of the process. A SIGXFSZ signal shall also be
sent to the
thread.[/XSI]</blockquote></blockquote>to:<blockquote>[EFBIG]<blockquote>The
<i>length</i> argument exceeds the file size limit of the process. [XSI]A
SIGXFSZ signal shall also be generated for the
thread.[/XSI]</blockquote></blockquote>
On page 1172 line 40121 page getrlimit(),
change:<blockquote>[XSI]RLIMIT_FSIZE<blockquote>This is the maximum size of
a file, in bytes, that can be created by a process. If a write or truncate
operation would cause this limit to be exceeded, SIGXFSZ shall be generated
for the thread. If the thread is blocking, or the process is catching or
ignoring SIGXFSZ, continued attempts to increase the size of a file from
end-of-file to beyond the limit shall fail with <i>errno</i> set to
[EFBIG].[/XSI]</blockquote></blockquote>to:<blockquote>RLIMIT_FSIZE<blockquote>This
is the maximum size of a file, in bytes, that can be created by a process.
If a write or truncate operation would cause this limit to be exceeded,
[XSI]a SIGXFSZ signal shall be generated for the thread; if the thread is
blocking, or the process is catching or ignoring SIGXFSZ,[/XSI] the
operation shall fail with an [EFBIG] error.</blockquote></blockquote>
On page 1555 line 52234 section posix_fallocate(),
change:<blockquote>[XSI][EFBIG]<blockquote>The value of
<i>offset</i>+<i>len</i> exceeds the file size limit of the process. A
SIGXFSZ signal shall also be sent to the
thread.[/XSI]</blockquote></blockquote>to:<blockquote>[EFBIG]<blockquote>The
value of <i>offset</i>+<i>len</i> exceeds the file size limit of the
process. [XSI]A SIGXFSZ signal shall also be generated for the
thread.[/XSI]</blockquote></blockquote>
On page 2423 line 78472 section write(), change:<blockquote>for example,
[XSI]the file size limit of the process or[/XSI] the physical end of a
medium</blockquote>to:<blockquote>for example, the file size limit of the
process or the physical end of a medium</blockquote>
On page 2423 line 78477 section write(), change:<blockquote>[XSI]If the
request would cause the file size to exceed the soft file size limit for
the process and there is no room for any bytes to be written, the request
shall fail and the implementation shall generate the SIGXFSZ signal for the
thread.[/XSI]</blockquote>to:<blockquote>If the request would cause the
file size to exceed the soft file size limit for the process and there is
no room for any bytes to be written, the request shall fail [XSI]and the
implementation shall generate a SIGXFSZ signal for the
thread[/XSI].</blockquote>
On page 2425 line 78551 section write(),
change:<blockquote>[XSI][EFBIG]<blockquote>An attempt was made to write a
file that exceeds the file size limit of the process, and there was no room
for any bytes to be written. A SIGXFSZ signal shall also be sent to the
thread.[/XSI]</blockquote></blockquote>to:<blockquote>[EFBIG]<blockquote>An
attempt was made to write a file that exceeds the file size limit of the
process, and there was no room for any bytes to be written. [XSI]A SIGXFSZ
signal shall also be generated for the
thread.[/XSI]</blockquote></blockquote>
On page 2505 line 81712 section 2.13 Shell Execution Environment, remove
XSI shading from:<blockquote>File size limit as set by
<i>ulimit</i></blockquote>
On page 3442 line 117558 section ulimit, remove XSI shading from the entire
SYNOPSIS except for the -t option.

On page 3442 line 117593 section ulimit, add XSI shading to the description
of <b>-t</b>.

====================================================================== 

Issue History 
Date Modified    Username       Field                    Change               
====================================================================== 
2023-04-17 14:15 geoffclare     New Issue                                    
2023-04-17 14:15 geoffclare     Name                      => Geoff Clare     
2023-04-17 14:15 geoffclare     Organization              => The Open Group  
2023-04-17 14:15 geoffclare     Section                   => ulimit          
2023-04-17 14:15 geoffclare     Page Number               => 3442            
2023-04-17 14:15 geoffclare     Line Number               => 117558          
======================================================================


  • [Issue 8 dra... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group
    • [Issue ... Austin Group Bug Tracker via austin-group-l at The Open Group

Reply via email to