bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: gnu tar 1.19 requires open() with O_DIRECTORY?


From: John E. Malmberg
Subject: Re: gnu tar 1.19 requires open() with O_DIRECTORY?
Date: Wed, 20 Feb 2008 20:26:53 -0600
User-agent: Thunderbird 2.0.0.9 (Windows/20071031)

Bruno Haible wrote:
John E. Malmberg wrote:

The open() would have to open or dup a file descriptor to the /dev/null device to reserve a unique file descriptor, and then something needs to map that file descriptor back to the pointer to the *DIR structure.

Do you need a pointer to the DIR structure, or only memorize the filename
of the directory? In the latter case, you can reuse most of the code from
gnulib/lib/fchdir.c.

Then the filename would have to be attached to the file descriptor obtained by opening the null device.

Btw, does VMS have the dirfd function (as a function or as a macro)?
It should return the file descriptor to a directory that is "held inside"
a DIR structure.

There is no dirfd() function on VMS, and replacement function in lib/dirfd is returning a -1.

The DIR structure on VMS is opaque to user code. It is unlikely that it contains a file descriptor, as the VMS native I/O does not use file descriptors.

Regards,
-John
address@hidden





reply via email to

[Prev in Thread] Current Thread [Next in Thread]