Path: utzoo!news-server.csri.toronto.edu!rutgers!usc!sdd.hp.com!hplabs!hpfcso!hpfcdc!donn From: donn@hpfcdc.HP.COM (Donn Terry) Newsgroups: comp.unix.wizards Subject: Re: POSIX bashing (Was Re: Retaining file permissions) Message-ID: <5980069@hpfcdc.HP.COM> Date: 11 Mar 91 18:09:59 GMT References: <3419@unisoft.UUCP> Organization: HP Fort Collins, Co. Lines: 37 >Sean Fagan writes about an implementation of rename(): 1) There are similar degenerate cases in any standard you care to name; the phases "quality of implementation" and "suitability to purpose" come to mind. 2) Where were you for the last Wierdnix contest?? Donn Terry Speaking only for myself. -------------------------------- >In article <6499@auspex.auspex.com> guy@auspex.auspex.com (Guy Harris) writes: >>One can think so only if one ignores the presence of, say, "mkdir()", >>"rmdir()", and "rename()", or a BSD-flavored signal mechanism in POSIX. >I hereby place, into the public domain, the following POSIX-compliant >rename(): >#include >#include >int >rename(from, to) >char *from, *to; { > if (access (from, 0) == -1) > return -1; > errno = EBUSY; > return -1; >} >-- >Sean Eric Fagan | "I made the universe, but please don't blame me for it; >sef@kithrup.COM | I had a bellyache at the time." >-----------------+ -- The Turtle (Stephen King, _It_) >Any opinions expressed are my own, and generally unpopular with others. >----------