fmemopen.3: Remove bogus suggestion to use setbuffer()

As Rich Felker comments:

    The stdio buffer associated with the fmemopen-obtained FILE,
    and the output memory buffer into which it's writing, are
    conceptually distinct entities, and there is no reason to
    expect reasonable results if you modify the contents of a
    setvbuf-associated buffer through other means while it's
    associated with a FILE.

See http://stackoverflow.com/questions/38854163/using-rewind-on-a-file-opened-with-fmemopen

Reported-by: Rich Felker <dalias@libc.org>
Signed-off-by: Michael Kerrisk <mtk.manpages@gmail.com>
This commit is contained in:
Michael Kerrisk 2016-08-10 11:39:00 +12:00
parent 423cb9f7ff
commit a9672faabc
1 changed files with 0 additions and 12 deletions

View File

@ -137,18 +137,6 @@ Disabling buffering with the following call
may be useful to detect errors at the time of an output operation:
setbuf(stream, NULL);
Alternatively, the caller can explicitly set
.I buf
as the stdio stream buffer, at the same time informing stdio
of the buffer's size, using:
setbuffer(stream, buf, size);
.\"
.\" See http://sourceware.org/bugzilla/show_bug.cgi?id=1995
.\" and
.\" http://sources.redhat.com/ml/libc-alpha/2006-04/msg00064.html
.\"
.SH RETURN VALUE
Upon successful completion,
.BR fmemopen ()