POSIX bashing (Was Re: Retaining file permissions)
Sean Eric Fagan
sef at kithrup.COM
Sat Mar 9 08:47:07 AEST 1991
In article <6499 at auspex.auspex.com> guy at 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 <unistd.h>
#include <errno.h>
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 at 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.
More information about the Comp.unix.wizards
mailing list