Defect Report concerning: IEEE Std. 1003.2-1992, ISO/IEC 9945-2:1993 - Shell & Utilities
Clause: 3.14.11
PASC Interpretation Ref: pasc-1003.2-99
Topic: set -x


This is an unapproved interpretation of PASC 1003.2-1992, ISO/IEC 9945-2:1993 - Shell & Utilities.

Use of the information contained in this unapproved document is at your own risk.

Last update: 20 April,2001


								1003.2-92  #99

 _____________________________________________________________________________

	Interpretation Number:	XXXX
	Topic:			set -x
	Relevant Sections:	3.14.11


Interpretation Request: (Defect Report)
-----------------------
	Date: Thu, 16 Mar 1995 07:32:02 +0000

This is an interpretation request for IEEE Std P1003.2-92.

	Topic : shell , set -x
	Publication: 1003.2-92

POSIX.2 requires that "set -x" will write a trace
for each command after the shell expands the command and before
it executes it.  The following script indicates that execution
occurs before the trace is written, as the call to "set +x" is
not recorded:

set -x
VAR1=1
VAR2=2
set +x
VAR3=3

This behaviour is different to present Korn Shell, which
has historically treated set +x specially; not tracing this.
Several tools uses this to do selective tracing.  We see that
the standard doesn't specify a special case for this, but we
know that it will break existing practice if we change this behavior.
All other commands are traced before execution.

Did the standard really intend to mandate the Bourne Shell behavior 
over Korn Shell, or was it just an oversight that they did not single out 
set +x as a special case?


Interpretation response
------------------------
The standard clearly states the behavior of set +x, and conforming 
implementations must conform to this.  However, concerns have been 
raised about this which are being referred to the sponsor.



Rationale:
None

Forwarded to Interpretations group: Mar 16 1995
Proposed resolution circulated: May 16th
Comments due: June 15th
Finalised: June 16th 1995