bug-gnu-utils
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: sed bug on seekable stdin


From: Paul Eggert
Subject: Re: sed bug on seekable stdin
Date: Sun, 17 Dec 2006 23:09:09 -0800
User-agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.4 (gnu/linux)

Andreas Schwab <address@hidden> writes:

> fflush on an input stream has undefined behaviour.

This is true in some versions of POSIX but not others.  It is a
contentious and murky area.  If memory serves, fflushing an input
stream had defined behavior in POSIX 1988, then it became undefined,
and now (or soon?) it is becoming defined again.

Anyway it doesn't hurt in practice to fflush and then fseek the input
stream, and in some cases it helps, so the change seems worthwhile.




reply via email to

[Prev in Thread] Current Thread [Next in Thread]