This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
> Glen,
Thats "Glenn" :-)
> You are right it is an NFS problem, when I run my code on my local
> disk I have no problems.
We've run into some weird interactions involving combinations of
NFS-3, NFS-2, and 64 bit file systems.
Eventually the vendors will sort things out.
> However, I still don't see why you want to set both O_TRUNC and O_EXCL
> in the same open call, they sure seem to do different things:
>
> O_TRUNCIf the file exists, its length is truncated to 0 and the mode and
> owner are unchanged. O_TRUNC has no effect on special files or
> directories.
>
> O_EXCL If O_EXCL and O_CREAT are set, open will fail if the file exists.
> The check for the existence of the file and the creation of the
> file if it does not exist is atomic with respect to other
> processes executing open naming the same filename in the same
>
> -ethan
I see what you are getting at, you are right.
I'll roll that into the patch to use the macros.
Thanks.
-glenn
>Keywords: 199709221820.MAA25471