WG15 Defect Report Ref: 13210-17
Topic: tcflow


This is an approved interpretation of 13210:1994. .

Last update: 1997-05-20


                                                                13210-92 #17
	Classification:  No change

 _____________________________________________________________________________


	Topic:			tcflow
	Relevant Sections:	7.2.2.3.2


Defect Report:
-----------------------

The ISO/IEC 13210:1994 section 7.2.2.3.2 has the following
assertions.

          07  A call to tcflow(fildes,TCIOFF) causes the system to transmit
          a STOP character, and the  return value is zero.

          Testing Requirement(s):
              Test when the data transmission on the line is suspended
              and is not suspended.

          08  A call to tcflow(fildes,TCION) causes the system to transmit
          a START character to restart suspended input, and the
          return value is zero.

          Testing Requirement(s):
              Test when the data transmission on the line is suspended
              and is not suspended.

The problem lies in the testing requirements, for sending a
STOP character when the line is already suspended, and for
sending a START character when the line is not suspended.


The testing requirement makes additional implementation
restrictions beyond that specified in ISO/IEC POSIX
9945-1:1990.  We would request that these assertions be
reworded to:

          07  A call to tcflow(fildes,TCIOFF) causes the system to transmit
          a STOP character, and the  return value is zero.

          Testing Requirement(s):
              Test when the data transmission on the line is not suspended.

          08  A call to tcflow(fildes,TCION) causes the system to transmit
          a START character to restart suspended input, and the
          return value is zero.

          Testing Requirement(s):
              Test when the data transmission on the line is suspended.



WG15 response for 13210:1993
--------------------------------------------------


The testing requirements are correct as they are now written.  They
refer to suspension of output on the line.

ISO/IEC 9945-1:1990 provides for programmatic flow control on
terminals that use asynchronous serial data transmission through
the tcflow() interface (7.2.2.2: page 146, lines 697-706).  The
specifications for output control (requests TCOOFF and TCOON)
define a persistent state of "suspended output", such that a
call to tcflow(fildes, TCOOFF) causes output to be suspended and
the output stays suspended until a call is made to
tcflow(fildes, TCOON).

The specifications for input flow control say simply that a STOP
character or a START character be sent for tcflow(fildes,
TCIOFF) and tcflow(fildes, TCION), respectively.

These STOP and START characters are intended to be sent to the
terminal at the remote end of the line.  This means that STOP or
START must be transmitted whether or not output is suspended.

The text of the testing requirements would be easier to
understand if they referred specifically to suspension of
output.


Rationale for Interpretation:
-----------------------------

The output to a terminal is produced by processes on the local
system.  Therefore, tcflow() can control suspension or
resumption of output unconditionally.  The case is different for
input, which is generated by a remote device that is ordinarily
not under the direct control of the system.  For input, tcflow()
sends the STOP and START characters to request that the remote
device suspend or resume transmission.

Note that in the descriptions of the four possible actions for
tcflow() in ISO/IEC 9945-1:1990 697-706) neither the TCION nor
the TCIOFF action is conditional on whether output is
suspended.  This means that the START and STOP characters are
treated as special characters, and are not considered to be
output.

There is also a definite advantage to users in requiring
unconditional sending of START and STOP because
this is what makes it possible for an application
to regain control of a terminal connection that
has become confused because of flow control problems.

 _____________________________________________________________________________