Date: Thu, 6 Nov 1997 18:00:02 -0800 (PST) From: Bill Fenner <fenner@parc.xerox.com> To: freebsd-bugs Subject: Re: bin/4961: Problems with fseek and fprints Message-ID: <199711070200.SAA29857@hub.freebsd.org>
next in thread | raw e-mail | index | archive | help
The following reply was made to PR bin/4961; it has been noted by GNATS. From: Bill Fenner <fenner@parc.xerox.com> To: tege@pdc.kth.se Cc: FreeBSD-gnats-submit@freebsd.org Subject: Re: bin/4961: Problems with fseek and fprints Date: Thu, 6 Nov 1997 17:55:52 PST tege@pdc.kth.se wrote: >1) fseek is ignored on files that were fdopen'ed in append mode. This is not a bug. ANSI C says that writes are only allowed at the end of file when opening in append mode (e.g. any write has an implicit seek to end preceding it). Open with "r+" if you want to write somewhere other than the end of file. >2) The second fprintf below sets errno even while no error really > happens. errno is not set on a 2.2.2-RELEASE system; on a 3.0-CURRENT system, errno is indeed set to ENOENT. Interestingly enough, it's the first fprintf that's setting errno. This is definitely worth looking into; I have no clue what fprintf might be doing that would cause a ENOENT. Bill
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199711070200.SAA29857>