Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Buffered stderr on Linux



On Mar 13, 12:17am, Zoltan Hidvegi wrote:
} Subject: Re: Buffered stderr on Linux
}
} Bart Schaefer wrote:
} > Stdio will call free() on the buffer at fclose().
}
} Well I've just checked it on Solaris and Linux and it seems that you are
} wrong.

Hm.  I was sure that I remembered running into a multiple-free problem at
one point with this.  However, the only notes I can find are about a case
where we avoided setbuf because we couldn't readily track the buffer pointer
all the way from setbuf to the fclose, and hence didn't know whether/when
to free it.  So either I've got some cruft from a really obscure platform
floating around in my head, which is entirely possible, or I was confused.

Sorry about the false alarm.


-- 
Bart Schaefer
http://www.well.com/user/barts




Messages sorted by: Reverse Date, Date, Thread, Author