develooper Front page | perl.perl5.porters | Postings from March 2002

Re: [ID 20020312.007] Perl 5.7.3 test failures on Cray T90, T3E

Thread Previous | Thread Next
From:
Keith Thompson
Date:
March 13, 2002 17:09
Subject:
Re: [ID 20020312.007] Perl 5.7.3 test failures on Cray T90, T3E
Message ID:
20020313170757.A21863@elmak.sdsc.edu
On Wed, Mar 13, 2002 at 08:14:53PM +0200, Jarkko Hietaniemi wrote:
[...]
> =head2 UNICOS and UNICOS/mk
> 
> The io/fs test #31 is failing because in UNICOS and UNICOS/mk
> truncate() cannot be used to grow the size of filehandles, only
> to reduce the size.  The workaround is to truncate files instead
> of filehandles.

I just tried a quick experiment, and it appears that truncate() and
ftruncate() can be used to grow files and filehandles, respectively,
on both the T90 and the T3E.  (It may be different on the J90,
which is likely running an older version of UNICOS.)  On the T3E,
the new portion of the file is filled with '\0's; on the T90, it's
filled with garbage.

The man page doesn't specifically say anything about the behavior
of truncate() or ftruncate() when the specified size is greater than
the current size of the file.  It does say this:

     These are compatibility functions, which are provided to aid in the
     porting of code from other systems.  They are implemented through a
     combination of open(2), lseek(2), and trunc(2) system calls.

-- 
Keith Thompson, San Diego Supercomputer Center  kst@sdsc.edu
<http://www.sdsc.edu/~kst/>  Office: 858-822-0853  Fax: 858-822-5407
Schroedinger does Shakespeare: "To be *and* not to be"

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About