Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!seismo!ut-sally!im4u!rutgers!labrea!decwrl!hplabs!sdcrdcf!trwrb!ucla-an!remsit!stb!michael From: michael@stb.UUCP (Michael) Newsgroups: comp.sys.amiga Subject: Re: PIPE:... should it buffer at all? Message-ID: <130@stb.UUCP> Date: Mon, 7-Sep-87 00:42:21 EDT Article-I.D.: stb.130 Posted: Mon Sep 7 00:42:21 1987 Date-Received: Tue, 8-Sep-87 06:35:45 EDT References: <571@sugar.UUCP> <92@stb.UUCP> <628@sugar.UUCP> Reply-To: michael@stb.UUCP (Michael) Organization: STB BBS, LA, CA, USA, 90402, (213) 459-7231 Lines: 58 Keywords: PIPE: buffer UNIX pipes In article <628@sugar.UUCP> peter@sugar.UUCP (Peter da Silva) writes: >> >Alternatively, how about making PIPE: act like the UNIX pipe? That is, you >> >can open it and write as much as you please without waiting until you fill > ^^^^^^^^^^^ >> >it up. You can have multiple writers but only one reader. The pipe hangs > ^^^^^^^^^^^^^^^^ >> >around as long as a single writer *or* reader wants it. And finally you can >> >reopen it without losing data. > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ >> >> Gee, thats how I thought PIPE: worked. > >Nope. If you open it, you currently wait for the reader to open it too. You >can also only have one writer. And if the writer closes it and the reader >closes it it goes away even if there's still data in it. This makes it >useless as a printer buffer (the obvious application for it: you open >PIPE:spool and write your data. Have a program read from PIPE:spool and >write to PRT:. Make PIPE:spool 16K long. Instant buffer.) Okay, lets look at unix pipes. I assume you mean Named Fifo's (pipe files in file space vs. pipe(2) sys call). #1. 4K buffer--after that, you wait until someone else reads it. #2. The system I have makes the writer wait until a reader shows up. #3. Both multiple readers and writers are allowed (remember: The dup() call will work for anything in unix, and fork implicitly dups every file descriptor). #4. You cannot reopen without losing data. Which system are you thinkin of? 4.3? (I'm using sys3). If I understand correctly, that system does not guarantee any atomicy of writes to pipes. >> Besides, I like P:, which can have multiple readers. > >I find it hard to fathom the use of multiple readers to a single pipe. Perhaps >you can describe an application you've used this feature for. Look at the "tee" command in unix. P: will send identical copies of data to a file, such as a CON: window, or another pipe (to another program), so one program's output will go to two destination programs. >> : Copy protection? Just say Pirate! (if its worth pirating) > >How are people supposed to take you seriously if you say things like this? >-- >-- Peter da Silva `-_-' ...!seismo!soma!uhnix1!sugar!peter >-- U <--- not a copyrighted cartoon :-> Gee, I suppose very. Seriously, I am strongly opposed to copy protection and "machine takeovers"; I will not willingly buy any program with either. I bought "Hex" thinking it wasn't protected, but I see now I need a better test for protected before I buy. But, I have changed my .signature now. And when I learn enough 68000 and amiga assembly, I will change it again. Michael. -- : Michael Gersten seismo!scgvaxd!stb!michael : Copy protection? Just say "Off site backup"