DOC HOME SITE MAP MAN PAGES GNU INFO SEARCH PRINT BOOK
 
File and device input/output

Creating a STREAMS-based pipe

In addition to opening a STREAMS-based driver, a Stream can be created by creating a pipe (see pipe(S)). Because pipes are not character devices, STREAMS creates and initializes a streamtab structure for each end of the pipe.

When the pipe system call is executed, two Streams are created. STREAMS follows the procedures similar to those of opening a driver; however, duplicate data structures are created. That is, two entries are allocated in the user's file table and two vnodes are created to represent each end of the pipe. The file table entries are initialized to point to the allocated vnodes and each vnode is initialized to specify a file of type FIFO.

Each Stream header represents one end of the pipe, and it points to the downstream half of each Stream head queue pair. Unlike STREAMS-based devices, however, the downstream portion of the Stream terminates at the upstream portion of the other Stream.


Next topic: Adding and removing modules
Previous topic: Opening a STREAMS device file

© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005