|Anonymous | Login||2022-05-28 05:13 UTC|
|Main | My View | View Issues | Change Log | Docs|
|Viewing Issue Simple Details|
|ID||Category||Severity||Type||Date Submitted||Last Update|
|0000280||[1003.1(2008)/Issue 7] Shell and Utilities||Editorial||Clarification Requested||2010-07-08 00:25||2013-04-16 13:06|
|Priority||normal||Resolution||Accepted As Marked|
|Name||Christoph Anton Mitterer|
|Section||set built-in utility|
|Final Accepted Text||See Note: 0000481|
|Summary||0000280: description is not clear enought on what happens if the shell immediately exits|
set allows to set several events on which the shell immediately exits (e.g. -e and -u).
It does however (at least in that place - http://www.opengroup.org/onlinepubs/9699919799/utilities/V3_chap02.html#set) [^] not specify the consequences (e.g. the exit status).
|Desired Action||Clarification of the above.|
In the case of -e the exit status is adequately described in the EXIT
STATUS section on the sh page. The description of set -e cannot
specify the final exit status of the shell because it might depend on
commands executed in an EXIT trap.
In the case of -u this does look like a genuine omission. Again, it
cannot specify the final exit status of the shell, but it should say
something about the exit status of the (unexecuted) command in which
the unset variable was used. This would then determine the exit
status of the shell in the absence of an EXIT trap (and would be
assigned to $? in an interactive shell).
The description of set -u is already being modified by 0000155. A
suitable new description that fixes both problems might be:
When the shell tries to expand an unset parameter other than the '@'
and '*' special parameters, it shall write a message to standard
error and shall not execute the command containing the expansion,
but for the purposes of setting the '?' special parameter and the
exit status of the shell the command shall be treated as having
been executed and returned an exit status of between 1 and 125
inclusive. A non-interactive shell shall immediately exit. An
interactive shell shall not exit.
|One could (for -e) add a note and link to EXIT STATUS section, and add (as a note) what you described here ("depend on commands executed in an EXIT trap").|
Don Cragun (manager)
Make the changes noted in Note: 0000457.
Note to editor: Apply this change after making the changes specified in 0000155.
|2010-07-08 00:25||calestyo||New Issue|
|2010-07-08 00:25||calestyo||Status||New => Under Review|
|2010-07-08 00:25||calestyo||Assigned To||=> ajosey|
|2010-07-08 00:25||calestyo||Name||=> Christoph Anton Mitterer|
|2010-07-08 00:25||calestyo||Section||=> set built-in utility|
|2010-07-08 00:25||calestyo||Page Number||=> none|
|2010-07-08 00:25||calestyo||Line Number||=> none|
|2010-07-08 05:40||Don Cragun||Page Number||none => 2358-2359|
|2010-07-08 05:40||Don Cragun||Line Number||none => 74545-74548,74590-74591|
|2010-07-08 05:40||Don Cragun||Interp Status||=> ---|
|2010-07-08 09:10||geoffclare||Note Added: 0000457|
|2010-07-12 21:46||calestyo||Note Added: 0000461|
|2010-07-29 15:39||Don Cragun||Final Accepted Text||=> See Note: 0000457|
|2010-07-29 15:39||Don Cragun||Note Added: 0000481|
|2010-07-29 15:39||Don Cragun||Status||Under Review => Resolved|
|2010-07-29 15:39||Don Cragun||Resolution||Open => Accepted As Marked|
|2010-07-29 15:40||Don Cragun||Final Accepted Text||See Note: 0000457 => See Note: 0000481|
|2010-08-27 11:16||ajosey||Tag Attached: tc1-2008|
|2012-05-11 08:08||geoffclare||Relationship added||related to 0000155|
|2012-05-11 08:09||geoffclare||Relationship added||related to 0000559|
|2013-04-16 13:06||ajosey||Status||Resolved => Closed|
|Mantis 1.1.6[^] Copyright © 2000 - 2008 Mantis Group|