Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implementing POSIX.1-2024 #84

Open
4 of 44 tasks
magicant opened this issue Nov 6, 2024 · 0 comments
Open
4 of 44 tasks

Implementing POSIX.1-2024 #84

magicant opened this issue Nov 6, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@magicant
Copy link
Owner

magicant commented Nov 6, 2024

This issue tracks the tasks involved in implementing the requirements for the shell as defined by The Open Group Base Specifications Issue 8.

  • Do not exit on an exec error in an interactive shell exec: Don't exit on exec failure if interactive #87
  • Update $! when resuming a background job #88
  • Allow esac as the first pattern of a case branch #89
  • ;& in case command ;&, ;|, and ;;& in case command items #90
  • Dollar-single-quotes
  • Declaration utility #20
  • New printf built-in semantics
    • Support indexing (%n$) in the printf built-in
    • Reject redundant characters after a quote for a numeric value operand
  • New cd built-in semantics
    • Update the exit status of cd where the new PWD value cannot be determined (with and without -e)
    • Reject an empty operand in the cd built-in
  • Update the exit status of getopts on error
  • New trap built-in semantics
    • trap (without options or operands) should show signals ignored by inheritance in exec
    • trap -p (without operands) should show all signals
  • New read built-in semantics (except byte-wise field splitting)
    • Add the -d option to the read built-in
    • The read built-in should treat quotes and escapes as specified in POSIX.1-2024
    • Return from the read built-in different exit statuses depending on the result
  • New job control semantics
    • Report immediately on suspension of a foreground job
    • Save the terminal state on suspension of a foreground job and restore when resuming
    • Treat a job suspended when any of its component processes is suspended
    • Treat successive synchronous and-or lists as a single foreground job
    • Discard remaining part of the current list when a foreground process is suspended
    • Allow job control without a controlling terminal
      • Avoid allocating a controlling terminal if the shell does not already have one
    • Use SIGTTIN to suspend the shell when starting job control in the background
    • Reset the shell’s process group ID to match the process ID when starting job control
  • Accept -- separator in the exec built-in
  • Reject if a redirection operand expands to more than one field in an interactive shell *
  • Abort the current line and continue the next when an interactive shell encounters a shell error that would exit a non-interactive shell
  • Exclude . and .. from pathname expansion results
  • Change false, pwd, and true to substitutive built-ins
  • Enable the interactive mode if the shell is invoked with the -s option and an operand with stdin and stderr connected to a terminal
  • Disallow disabling the ulimit built-in in configure and add test cases for the built-in
  • Remove a trailing slash from tilde expansion replacement
  • Reject parentheses and the -a and -o options in the test built-in in the POSIXly-correct mode
  • Reject making LINENO, OLDPWD, OPTARG, OPTIND, and PWD readonly *
  • Document POSIX non-conformance of brace expansion
  • Return exit status 128 on unrecoverable read error
  • Set the exit status of suspended jobs to $? only in interactive job-controlling shells
  • Report the process (group) ID when an interactive shell starts a background job
  • Signal the shell process when the shell is exiting with an exit status representing a signal
  • Support (or reject) {n} prefix of redirections
  • Keep the tilde expansion result with an empty HOME from empty field removal
  • Reconsider the semantics of the -h and -o nolog options and update documentation
  • Reconsider when alias substitution should be performed in command substitutions of the form $(...)
  • Import only variables that have a valid name from the environment
  • Allow any non-null bytes (possibly not valid characters) in environment variable values
  • Allow any non-null bytes (possibly not valid characters) in parameter values
  • Change result types of expansions from character strings to bytes
  • Reimplement field splitting in terms of bytes
  • Revise field splitting in the read built-in to match the new field splitting semantics
  • Sort byte-by-byte if results of pathname expansion collate equal
  • Update documentation on the POSIX version

Items marked with an asterisk are behaviors that are newly allowed (but not required) by POSIX.1-2024.

The following are requirements that were not added in POSIX.1-2024, but have existed since earlier versions of POSIX.

@magicant magicant added the enhancement New feature or request label Nov 6, 2024
@magicant magicant pinned this issue Nov 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant