glibc - tmpfs - readdir

Jochen Schlick jochen.schlick at comsoft.de
Thu Jan 19 12:27:56 UTC 2006


Alain PORTAL wrote:
> Hi,
> 
> Le Jeudi 19 Janvier 2006 10:58, Jochen Schlick a écrit :
>> hi,
>>
>> i have an application which calls readdir(3) for
>> accessing directories in tmpfs. after several hours
>> the readdir call returns sometimes with einval. under
>> which circumstances can readdir(3) produce einval ?
> 
> Are you sure it is readdir(3) and not readdir(2) ?
> 
> It seems there is only one return value for readdir(3): EBADF.
> 
> But readdir(2) have a EINVAL return value.
> Man page say: "EINVAL: Result buffer is too small."
> 
> Regards,
> Alain.
> 

It is readdir(3) !!! It is only used to get all the filenames
for later removal (some hundred msecs later)... The directory
is part of a tmpfs because other filesystems are to slow.




regards,
-- 
Jochen Schlick






More information about the devel mailing list