Notes |
(0003084)
geoffclare (manager)
2016-02-23 15:04
|
Comparing the original POSIX.2-1992 text with the SUSv4 2013 edition, there are some places where POSIX.2 had "trap" with no special formatting and in SUSv4 these have italicised "trap" and (sometimes) dropped a preceding "the", thus turning them into references to the trap utility. The line reported here is one case. Others I have spotted are at line 76213:The environment in which the shell executes a trap on EXIT shall be identical to the environment immediately after the last command executed before the trap on EXIT was taken. and 76215:Each time trap is invoked, the action argument shall be processed in a manner equivalent to:
<tt>eval action</tt>
There are probably more cases. We should double check every use of "trap" in section 2.14. |
|
(0003085)
shware_systems (reporter)
2016-02-23 15:53
|
Perhaps spelling out "when a trapped signal or EXIT occurs" rather than "executes a trap" or "trap is invoked" cleaner for describing what the shell signal handlers are expected to do, and trap by itself limited to describing actions the utility performs in setting up how the shell responds. |
|
(0003510)
rhansen (manager)
2016-12-08 16:09
|
(TC2 page and line numbers)
Change page 2399, lines 76765-76766 from:A trap on EXIT shall be executed before the shell terminates, except when the exit utility is invoked in that trap itself, in which case the shell shall exit immediately. to:A trap action on EXIT shall be executed before the shell terminates, except when the exit utility is invoked in that trap action itself, in which case the shell shall exit immediately.
On page 2420 lines 77493-77494, change:The value of <tt>"$?"</tt> after the trap action completes shall be the value it had before trap was invoked. to:The value of <tt>"$?"</tt> after the trap action completes shall be the value it had before the trap action was executed.
On page 2420 lines 77500-77502, change:The environment in which the shell executes a trap on EXIT shall be identical to the environment immediately after the last command executed before the trap on EXIT was taken.
Each time trap is invoked, the action argument shall be processed in a manner equivalent to:
to:The environment in which the shell executes a trap action on EXIT shall be identical to the environment immediately after the last command executed before the trap action on EXIT was executed.
If action is neither <tt>'-'</tt> nor the empty string, then each time a matching condition arises the action shall be executed in a manner equivalent to: |
|