Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!olivea!uunet!rbj From: rbj@uunet.UU.NET (Root Boy Jim) Newsgroups: comp.sys.sequent Subject: Re: mv not atomic in dynix Keywords: mv Message-ID: <123459@uunet.UU.NET> Date: 21 Feb 91 00:01:45 GMT References: <1991Feb16.000101.4149@ux1.cso.uiuc.edu> <145463@pyramid.pyramid.com> <53625@sequent.UUCP> Organization: UUNET Communications Services, Falls Church, VA Lines: 62 In article <53625@sequent.UUCP> petebob@eng3.UUCP (Pete Apple) writes: ?In article <145463@pyramid.pyramid.com> csg@pyramid.pyramid.com (Carl S. Gutekunst) writes: ?>If you are talking about DYNIX (4.2BSD), this is not true; the rename(2) ?>system call is used and it is atomic. Assuming you aren't using the mv(1) in ?>the att universe, of course. ? ?The att universe version of mv_dir uses the rename(2) system call. It took AT&T long enuf to realize they needed mkdir, rmdir, and rename system calls. Unfortunately, they still insist on this nonsense mvdir command. ?The ucb universe is just as described, the standard 4.2BSD version of mv(1). Except that the standard isn't 4.2 anymore. It's 4.3. And beyond. There are many of your customers who are distressed at the low baud rate at which bits flow from UCB to each of your companies. ?>If you are talking about DYNIX/ptx (SVR3.2), then you are correct. There is ?>no rename(2) call, mv(1) is not atomic (it uses link(2) and unlink(2)), and ?>you are SOL. That's just the way System V works. Ooooh, that's scary! However, I wonder about the AT&T broken ln syndrome. Somewhere along the line, AT&T broke ln(1) so that if you do: who > a; ls > b; ln a b you will get one file with two links successfully, rather than two different files and failure. ?That's not how DYNIX/ptx works. There is a rename(2) system call in ?DYNIX/ptx and mv(1) has been changed to use it. rename(2) has been ?there from the beginning of DYNIX/ptx. I believe mv(1) was changed to ?use rename(2) for the V1.1 release. Well, Carl, that'll teach you to post flames in a hostile newsgroup :-) ?[Editorial Comment: Remember, I'm a just an en-g-neer, not a spokesman:] ?One of the ideas behind calling the new operating system DYNIX/ptx was ?to give the impression that it is based on the original DYNIX. Many ?important features from DYNIX (such as rename(2)) were added to ?DYNIX/ptx while still maintaining industry standards. (SVR3.2, SVID, ?POSIX, XPG, etc) And SVR3.2 isn't the standard either. SVR4 is. And don't forget the most important standard: BSD. I hope that PTX will not include this dual universe nonsense. A unified approach (such as the one taken by Sun and Dec, probably others) is much better. Users want the best features from both systems. ?Personally, I wanted to call it DYNIX_Bob, but no one listened to me. :-) :-) ?-- ?Pete_Bob Apple Sequent Computer Systems ?petebob@sequent.com, sequent!petebob 15450 S.W. Koll Parkway ?Bob is not just a name.. Beaverton, Oregon 97006 ?It's a way of life.. (503) 626-5700 I think you're too close to Twin Peaks :-) -- [rbj@uunet 1] stty sane unknown mode: sane