Path: utzoo!mnetor!uunet!husc6!rutgers!sunybcs!bingvaxu!leah!itsgw!imagine!pawl15.pawl.rpi.edu!jesup From: jesup@pawl15.pawl.rpi.edu (Randell E. Jesup) Newsgroups: comp.sys.amiga Subject: Re: Some ideas for KS/WB 1.3 Message-ID: <274@imagine.PAWL.RPI.EDU> Date: 28 Jan 88 07:32:46 GMT References: <8801251900.AA00551@cory.Berkeley.EDU> Sender: news@imagine.PAWL.RPI.EDU Reply-To: beowulf!lunge!jesup@steinmetz.UUCP Organization: RPI Public Access Workstation Lab - Troy, NY Lines: 31 In article <8801251900.AA00551@cory.Berkeley.EDU> dillon@CORY.BERKELEY.EDU (Matt Dillon) writes: >> Make "MODE_OLDFILE" read-only, even if this will certainly >> break lots of programs. It is the only function holding a > It will break just about every program in existance. I would also >like to point out that some of us may *want* to have several programs writing >the same file at the same time, or one program writing while another is >reading. A better thing to do would be to add a new mode that is READ with >an exclusive lock. > -Matt I would prefer a MODE_REALREADONLY or somesuch that REALLY would not let you write, but would let you read even if another program was writing to it (we HAVE both exclusive and shared locks already, let's use them). And of course, MODE_SAFEREAD, which doesn't allow others to write to it while you're reading (as you suggested); and a variant on it, MODE_SAFEREADONLY, which allows you to safely read ala mode_saferead, but doesn't allow YOU to write either. These MODE_(SAFE)READONLY commands gives you a bit more safety when reusing code that accesses important files. They may not be strictly neccesary, but they reduce the chance of trouble from poorly-written or buggy code, or in things where the user could do very dangerous things because of the tools provided (interpreters are a good example). The MODE_SAFEREAD really is needed. // Randell Jesup Lunge Software Development // Dedicated Amiga Programmer 13 Frear Ave, Troy, NY 12180 \\// beowulf!lunge!jesup@steinmetz.UUCP (518) 272-2942 \/ (uunet!steinmetz!beowulf!lunge!jesup) BIX: rjesup