Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!rutgers!sri-unix!hplabs!hao!ico!markh From: markh@ico.UUCP (Mark Hamilton) Newsgroups: comp.unix.wizards Subject: Re: Streams Loop-Around driver... Message-ID: <258@ico.UUCP> Date: Fri, 23-Jan-87 11:19:57 EST Article-I.D.: ico.258 Posted: Fri Jan 23 11:19:57 1987 Date-Received: Sat, 24-Jan-87 08:02:18 EST References: <1341@cadovax.UUCP> Lines: 23 Summary: Look at the streams pipe device In article <1341@cadovax.UUCP>, mitchell@cadovax.UUCP (Mitchell Lerner) writes: > Is the Loop-Around driver as shown in the the System V version 3 Streams > Programmers Guide in chapter 12 a way that I can do inter-process > communication? I'm not sure that you can actualy open the driver from streams > on two separate processes (or more?) and have the driver connect the two > streams. Can I use this type of Streams driver as the basis for an inter- > process communications facility? Yes, you can open this device from two separate processes and connect them. Each process should perform a clone open (assuring a unique minor number), and then one of the processes should do a "LOOP_SET" ioctl. (Actually both could do the ioctl if they are prepared to ignore the EBUSY error.) You cannot connect more than two streams in this way, as each extra connect returns EBUSY, however, it should be fairly easy to add the ability to do that if you know what the semantics should be. As an aside, you may want to consider the stream-pipe device which I believe is part of the standard V.3 distribution (/dev/spx). The operation of the device simulates a pipe between two processes, but you have the added advantage of being able to push other modules onto the "pipe". -- Mark Hamilton InterActive Systems