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: Bruno Haible
Subject: Re: gnu tar 1.19 requires open() with O_DIRECTORY?
Date: Thu, 21 Feb 2008 02:54:51 +0100
User-agent: KMail/1.5.4

John E. Malmberg wrote:
> I could not find that Posix specification on the web, not even a draft.

POSIX:2001 is the same as the "OpenGroup Base Specification Issue 6" and
also known as "SUSv3". You find it on the web at
   http://www.opengroup.org/susv3/

> 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.

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.

Bruno





reply via email to

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