WG15 Defect Report Ref: 9945-1-11
Topic: pipe as a file & characteristics


This is an approved interpretation of 9945-1:1990.

.

Last update: 1997-05-20


                                                                9945-1-90 #11

        Classification: No change

 _____________________________________________________________________________


	Topic:			pipe as a file & characteristics
	Relevant Sections:	2.2.2.59, 2.2.2.27, 5.6.1


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


    In 2.2.2.59 pipe, page 17, lines 276-280:

	"An object accessed by one of the pair of file descriptors
	created by the pipe() function.

    Once created, the file descriptors can be used to manipulated it,
    and it behaves identically to a FIFO special file when accessed
    in this way.  It has no name in the file hierarchy."

    In 2.2.2.27 file, page 14, lines 162-165:

	"An object that can be written to, or read from, or both.

    A file has certain attributes, including access permissions and
    type.  File types include regular file, character special file,
    block special file, FIFO special file, and directory.  Other types
    of file may be defined by the implementation."
 
    In 5.6.1 File Characteristics: Header and Data Structure, page 101,
    lines 648-650:

	"The structure members st_mode, st_ino, st_dev, st_uid, st_gid,
	st_atime, st_ctime, and st_mtime shall have meaningful values
	for all file types defined in this part of ISO/IEC 9945."

    In 6.1.1.2 Description [Pipes], page 113, lines 22-23:

	"Upon successful completion, the pipe() function shall mark for
	update the st_atime, st_ctime, and st_mtime fields of the pipe."

    Is a pipe a file?  Is pipe a file type defined in POSIX.1?  Does
    POSIX.1 specify that the fields of the stat structure have meaningful
    values for pipes?  The description of the pipe() function does not
    specify the setting of the st_uid or st_gid fields.

WG15 response for ISO/IEC 9945-1:1990 (IEEE Std 1003.1-1990)
--------------------------------------------------
A pipe is an object that behaves identically to a FIFO special file
when accessed via file descriptors.

The standard does not specify to what extent a pipe "is" a file, and
the behaviour of the pipe in respect of "other" file operations is
unspecified.

The standard specifies that stat() returns a structure that contains
meaningful values for st_atime, st_ctime, and st_mtime for a pipe.
The values of other fields return by stat() are not specified for a pipe.


Rationale for Interpretation:
-----------------------------
A pipe does not support all semantics of a file, yet it is not the
intention to preclude its implementation as a file on disk.

 _____________________________________________________________________________