Mail Archives: djgpp/1998/05/05/14:31:34
In article <Pine DOT SUN DOT 3 DOT 91 DOT 980503184236 DOT 19706l-100000 AT is>, Eli Zaretskii
<eliz AT is DOT elta DOT co DOT il> writes
>About O_RDONLY, O_WRONLY and O_RDWR:
>
> ...the programmer *must* specify one of these.
>
>About O_TRUNC:
>
> This flag should be used only on ordinary files open for
> writing.
>
>So it seems to me that using O_TRUNC with no O_WRONLY or O_RDWR is an
>error, as far as Posix is concerned.
Surely it means its invalid on a file opened RDONLY, correct for WRONLY,
open to argument (but probably valid) on RDWR?
After all the perceived problem is that O_WRONLY/O_RDWR is not implicit
in O_TRUNC, buts needs to be explicitly supplied.
---
Paul Shirley: my email address is 'obvious'ly anti-spammed
- Raw text -