Austin Group Defect Tracker

Aardvark Mark IV

Viewing Issue Simple Details Jump to Notes ] Issue History ] Print ]
ID Category Severity Type Date Submitted Last Update
0001807 [1003.1(2016/18)/Issue7+TC2] Shell and Utilities Comment Clarification Requested 2024-02-03 01:20 2024-02-03 01:20
Reporter cquike View Status public  
Assigned To
Priority normal Resolution Open  
Status New  
Name Enrique Garcia
User Reference
Section 2.7 Redirection
Page Number (page or range of pages)
Line Number (Line or range of lines)
Interp Status ---
Final Accepted Text
Summary 0001807: Allow number of redirection open files to be up to OPEN_MAX / 2 - 1
Description The redirection description states that numbers are used to represent the file descriptors and that "all implementations shall support at least 0 to 9, inclusive, for use by the application".

The restriction to have "at least 9" seems a bit low to me, given that the implementation can support up to OPEN_MAX file descriptors. There are many pages in Internet that include examples like "exec 200<lock.file" that will fail in POSIX shells that don't allow more than 9 in the file descriptor.

Some shells, like dash (which by the way has a limit of strictly 9), duplicates the original file descriptor (, [^] so in order to avoid issues with those implementations the file descriptor number shouldn't not be larger than OPEN_MAX / 2 - 1.
Desired Action On section "2.7 Redirection" of "Shell Command Language" change:

      ...The largest possible value is implementation-defined; however, all implementations shall support at least 0 to 9, inclusive, for use by the application....


      ...The largest possible value shall be OPEN_MAX / 2 - 1, inclusive, for use by the application, where OPEN_MAX is defined in sysconf....
Tags No tags attached.
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2024-02-03 01:20 cquike New Issue
2024-02-03 01:20 cquike Name => Enrique Garcia
2024-02-03 01:20 cquike Section => 2.7 Redirection
2024-02-03 01:20 cquike Page Number => (page or range of pages)
2024-02-03 01:20 cquike Line Number => (Line or range of lines)

Mantis 1.1.6[^]
Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker