Before releasing the LiS incorporating these changes I need to solicit your opinions on a matter.
When a user process opens a specific stream {maj,min} for a second or subsequent open, LiS (and Solaris) calls the driver open routines for all the modules in the stream to announce this fact. These open calls are not balanced by calls to the driver close routine, since the close routine is called only on the LAST close on the stream.
So far, so good.
When a clone open occurs the initial open is to {clone,maj} with the driver's open routine being called with {maj,0} and the clone flag set. The driver returns an updated {maj,min} to use. If this {maj,min} is currently not open then STREAMS simply uses the stream head structure that was originally for {clone,maj} to operate {maj,min}.
So far, so good.
But what happens if a clone open returns a {maj,min} that is already open? At the moment, LiS does NOT call the open routine of the driver that owns {maj,min}, on the theory that the driver open routine was already called via the clone driver.
But is that correct? An alternate theory is that a clone open to an already-open {maj,min} could be seen as a indirect open to that stream and that normal re-open semantics would be to call the open routines.
Does anyone have any direct evidence of what other STREAMS implementations do in this case? I don't have a Solaris test case for this.
Thanks, Dave
_______________________________________________ Linux-streams mailing list [EMAIL PROTECTED] http://gsyc.escet.urjc.es/mailman/listinfo/linux-streams
