-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix how unrecognized options are handled in 'sleep' and 'suspend' (#93)
When a builtin is given an unrecognized option, the usage information for that builtin should be shown as 'Usage: builtin-name options'. The sleep and suspend builtins were an exception to this. 'suspend' would not show usage information and sleep wouldn't exit on error: $ suspend -e /usr/bin/ksh: suspend: -e: unknown option $ time sleep -e 1 sleep: -e: unknown option real 0m1.00s user 0m0.00s sys 0m0.00s src/cmd/ksh93/bltins/sleep.c: - Show usage information and exit when sleep is given an unknown option. This bugfix was backported from ksh2020: att#1024 src/cmd/ksh93/bltins/trap.c: - Use the normal method of parsing options with optget to fix the suspend builtin's test failure. src/cmd/ksh93/tests/builtins.sh: - Add the ksh2020 regression test for getting the usage information of each builtin. Enable all /opt/ast/bin builtins in a subshell since those should be tested as well (aside from getconf and uname because those builtins fallback to the real commands on error).
- Loading branch information
Showing
4 changed files
with
30 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters