Re: fread/fwrite/fflush bug
Re: fread/fwrite/fflush bug
- Subject: Re: fread/fwrite/fflush bug
- From: Stephen Hoffman <email@hidden>
- Date: Mon, 07 Jan 2008 15:04:10 -0500
- Organization: HoffmanLabs LLC
Norm Green writes:
I've found what I consider to be a stream IO bug.
Not the answer you want, but -- since you're apparently looking for
portability -- I'll send it anyway.
Write sharing within a file is usually a somewhat hazardous
assumption. It's not particularly portable.
There are platforms that can handle this, and platforms that can't.
Here's what was received when invoking this (ported) test case on
another platform:
Failed opening the reader: non-translatable vms error code: 0x1828A
%rms-e-flk, file currently locked by another user
Sharing was explicitly blocked by the platform (because of the issues
that can arise), and the platform (as expected) punted this request.
The program source was tweaked to allow file-level sharing (including
distributed locking and sharing, which the platform can provide), and
received:
Failed when calling fread() on the reader: error 0
Having worked with the code some, it doesn't directly port -- not
without more time than can be assigned to the effort right now.
There are various other portability concerns here, which can be provided
off-list -- if you're interested.
If there's a language lawyer on the list, s/he can let us know what
write-sharing semantics exist in this environment.
But I'd not tend to depend on sharing within a file in portable code.
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Darwin-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden