bug-gnulib
[Top][All Lists]
Advanced

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

Re: read-file on HP NonStop


From: Pádraig Brady
Subject: Re: read-file on HP NonStop
Date: Tue, 05 Oct 2010 10:49:04 +0100
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.8) Gecko/20100227 Thunderbird/3.0.3

On 05/10/10 02:51, Bruno Haible wrote:
> Joachim Schmitz writes:
>> Doesn't work here, same problem:
>> Read 68 from /etc/resolv.conf...
>> FAIL: test-read-file
>>
>> And to clarify: the problem is not the symlink, it is the different
>> personalities in NonStop. A symlink inside the OSS personality wouldn't
>> be a problem, a symlink to an EDIT file in Guardian is, in respect to
>> the size stat() reports.
> 
> This means, you have a problem with stat() or with the S_ISREG macro.
> 
> In Unix, when S_ISREG of a file is true, then you should be able to read
> exactly as many bytes from the file as stat() returned in the st_size.
> 
> Therefore on NonStop Kernel, so that stat() and S_ISREG works on all files,
> one of the following needs to be done:
>   a) stat() needs to be fixed or wrapped, so that it sets the st_size
>      to 68 instead of 2144 in said situation.
>   b) stat() needs to be fixed or wrapped, so that it sets the st_mode
>      field to a value for which S_ISREG returns 0.
>   c) S_ISREG needs to be fixed or replaced, so that it returns 0 when
>      given as argument the st_mode value from an statbuf for said file.

Well a file can grow between stat and read.
Also `stat /proc/cmdline` returns 0 here,
but the file has data.



reply via email to

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