fopen ( ..., "a" ) --- how does the "a" work?

Chris Torek chris at mimsy.umd.edu
Fri Dec 8 00:11:14 AEST 1989


In article <895 at hsi86.hsi.UUCP> stevens at hsi.UUCP (Richard Stevens) writes:
>... Interesting, however, is that the 4.3BSD source differs.  It does
>an lseek to the EOF when fopen is called, and that's it.  4.3 does
>have an O_APPEND option to open, but it doesn't appear to be used.

This is scheduled to change (to match the wording in the ANSI standard).
I also wrote code to assert FAPPEND mode on fdopen(fd, "a").  This is a
bit nastier, but would seem to be required for reasons of sanity.  I do
not, however, clear FAPPEND on other fdopen calls.

What does SysV do?  What does the SVID say?
-- 
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain:	chris at cs.umd.edu	Path:	uunet!mimsy!chris



More information about the Comp.unix.questions mailing list