Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!rutgers!husc6!sri-unix!ctnews!pyramid!uccba!hal!ncoast!allbery From: allbery@ncoast.UUCP Newsgroups: comp.unix.questions Subject: Re: Three-way write Message-ID: <4946@ncoast.UUCP> Date: Tue, 27-Oct-87 20:44:38 EST Article-I.D.: ncoast.4946 Posted: Tue Oct 27 20:44:38 1987 Date-Received: Sat, 31-Oct-87 04:32:03 EST References: <3154@uwmcsd1.UUCP> <15100001@bucc2> <273@ddsw1.UUCP> <2241@sfsup.UUCP> Reply-To: allbery@ncoast.UUCP (Brandon Allbery) Followup-To: comp.unix.questions Organization: Cleveland Public Access UN*X, Cleveland, Oh Lines: 24 As quoted from <2241@sfsup.UUCP> by mpl@sfsup.UUCP (M.P.Lindner): +--------------- | In article <273@ddsw1.UUCP>, karl@ddsw1.UUCP writes: | > In article <15100001@bucc2> brian@bucc2.UUCP writes: | > >> I'm looking for C source code to a three (or more) way write program. | > > I am currently writing such a program. It will only run on SysV, though, | > >since I am using shared memory. | > I've posted a up-to 15 user chat program for System III and later (it uses | > named pipes) to alt.sources a while ago. It's written for System V, and | | Has anyone ever considered writing a "write" program that writes to ttys? | Amazingly enough, this is how the two way "write" program does it, and guess | what? It's portable! I know there are certain drawbacks, like each user +--------------- The purpose of the IPC is to prevent the output of three different users all being jumbled together; think of it as a "write spooler", that's basically the idea. Since there is no way to write to a tty "atomically" (try it! --and no, O_APPEND doesn't work on character devices), this is the only way to "spool" tty writes. -- Brandon S. Allbery necntc!ncoast!allbery@harvard.harvard.edu {{harvard,mit-eddie}!necntc,well!hoptoad,sun!mandrill!hal}!ncoast!allbery "Uncle _who_?" -- Lt. Worf