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