|
|
One way to construct a Stream is to open (see open(2)) a STREAMS-based driver file.
If the open call is the initial file open, a Stream is created. (There is one Stream per major/minor device pair.)
If this is the initial open of this Stream, the driver open routine is called. If modules have been specified to be autopushed, they are pushed immediately after the driver open. When a Stream is already open, further opens of the same Stream result in calls to the open procedures of all pushable modules and the driver open. Note that this is done in the reverse order from the initial Stream open. In other words, the initial open processes from the Stream end to the Stream head, while later opens process from the Stream head to the Stream end.