Jeff Garzik wrote:
>>
>> Well, as Jeremy pointed out, in the absence of threads you can do the
>> same thing with fchdir(), however, that's much more of a hack.
>
> My posixutils project (coreutils replacement) used fchdir(2), but that
> still doesn't get you 100% race-free. It gets you close, ye
H. Peter Anvin wrote:
Jeff Garzik wrote:
What the *at() interfaces really do is fix/paper over a longstanding
wart in Unix: the cwd really should have been a standard file descriptor
(like stdin/stdout/stderr) instead of a magic piece of state maintained
in kernel space.
It's more than a wart,
Jeff Garzik wrote:
>>
>> What the *at() interfaces really do is fix/paper over a longstanding
>> wart in Unix: the cwd really should have been a standard file descriptor
>> (like stdin/stdout/stderr) instead of a magic piece of state maintained
>> in kernel space.
>
> It's more than a wart, IMO.
H. Peter Anvin wrote:
Miklos Szeredi wrote:
The *at() thing basically gives you the advantages of a CWD without
the disadvantages.
For example it could be useful to implement the functionality of
find(1) as a library interface.
What the *at() interfaces really do is fix/paper over a longstan
Miklos Szeredi wrote:
>
> The *at() thing basically gives you the advantages of a CWD without
> the disadvantages.
>
> For example it could be useful to implement the functionality of
> find(1) as a library interface.
>
What the *at() interfaces really do is fix/paper over a longstanding
wart i
Jeremy Fitzhardinge <[EMAIL PROTECTED]> writes:
> This should work:
>
>fchdir(fd1);
>open("file1", O_RDWR | O_CREAT);
>fchdir(fd2);
>open("file2", O_RDWR | O_CREAT);
This is not thread-safe.
Andreas.
--
Andreas Schwab, SuSE Labs, [EMAIL PROTECTED]
SuSE Linux Products GmbH, Maxf
> > fd1 = open("dir1", O_DIRECTORY):
> > fd2 = open("dir2", O_DIRECTORY);
> > system("mount -t tmpfs none dir1");
> > system("mount -t tmpfs none dir2");
> > openat(fd1, "file1", O_RDWR | O_CREAT);
> > openat(fd2, "file2", O_RDWR | O_CREAT);
> > If you have a better way to accomplish this, let me k
Jan Engelhardt wrote:
fd1 = open("dir1", O_DIRECTORY):
fd2 = open("dir2", O_DIRECTORY);
system("mount -t tmpfs none dir1");
system("mount -t tmpfs none dir2");
openat(fd1, "file1", O_RDWR | O_CREAT);
openat(fd2, "file2", O_RDWR | O_CREAT);
If you have a better way to accomplish this, let me know.
On Mon, Jul 16, 2007 at 09:56:10AM +0200, Jan Engelhardt wrote:
> >Just one question: what the bleeding hell for? Not that the rest of
> >..at() family made any damn sense as an interface...
>
> fd1 = open("dir1", O_DIRECTORY):
> fd2 = open("dir2", O_DIRECTORY);
> system("mount -t tmpfs none dir1
On Jul 15 2007 23:23, Al Viro wrote:
>On Sun, Jul 15, 2007 at 02:13:21PM -0700, Nicholas Miell wrote:
>>
>> I suspect he was asking for
>>
>> int getxattrat(int fd, const char *path, const char *name, void *value,
>> size_t size, int flags)
>> int setxattrat(int fd, const char *pa
Al Viro wrote:
>
BTW, why is fstatat called fstatat and not statat? (Same goes for
futimesat.) It does not take a file descriptor for the file argument.
Otherwise we'd also need fopenat/funlinkat, etc. Any reasons?
>>> Ulrich having an odd taste?
>> Solaris compatibility.
>
> "Su
On Sun, Jul 15, 2007 at 02:13:21PM -0700, Nicholas Miell wrote:
>
> I suspect he was asking for
>
> int getxattrat(int fd, const char *path, const char *name, void *value,
> size_t size, int flags)
> int setxattrat(int fd, const char *path, const char *name, void *value,
>
On Sun, 2007-07-15 at 21:53 +0100, Al Viro wrote:
> On Sun, Jul 15, 2007 at 09:46:27PM +0200, Jan Engelhardt wrote:
> > Hi,
> >
> >
> > recently, the family of *at() syscalls and functions (openat, fstatat,
> > etc.) have been added to Linux and Glibc, respectively.
> > In short: I am missing xa
On Sun, Jul 15, 2007 at 09:46:27PM +0200, Jan Engelhardt wrote:
> Hi,
>
>
> recently, the family of *at() syscalls and functions (openat, fstatat,
> etc.) have been added to Linux and Glibc, respectively.
> In short: I am missing xattr at functions :)
No. They are not fscking forks. They are
Hi,
recently, the family of *at() syscalls and functions (openat, fstatat,
etc.) have been added to Linux and Glibc, respectively.
In short: I am missing xattr at functions :)
BTW, why is fstatat called fstatat and not statat? (Same goes for
futimesat.) It does not take a file descriptor for t
15 matches
Mail list logo