[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: (Fwd) Re: motherlode reboot issue
- Subject: Re: (Fwd) Re: motherlode reboot issue
- Date: Thu, 09 Jan 2003 16:37:57 -0700
Anne (et all),
>Date: Thu, 09 Jan 2003 16:29:48 -0700
>From: Anne Wilson <address@hidden>
>To: address@hidden
>Subject: Re: (Fwd) Re: motherlode reboot issue
The above message contained the following:
> Independent of motherlode, the issue was raised as to whether upon queue
> creation simply writing the last byte of the queue would be sufficient to
> acquire all the space. Does seeking to the last byte also zero out everything
> before it? I'll leave this issue to Steve.
Here's what the UNIX standard has to say:
The behaviour of lseek() on devices which are incapable of seeking
is implementation-dependent. The value of the file offset associated
with such a device is undefined.
The lseek() function will allow the file offset to be set beyond the
end of the existing data in the file. If data is later written at
this point, subsequent reads of data in the gap will return bytes
with the value 0 until data is actually written into the gap.
The lseek() function will not, by itself, extend the size of a file.
If fildes refers to a shared memory object, the result of the
lseek() function is unspecified.
Because the product-queue is a shared memory object, it looks like there
are no guarantees unless the file is initially created not as a shared
memory object, but as a regular file.
Regards,
Steve Emmerson <http://www.unidata.ucar.edu>