Article View: NET.v7bugs
Article #3col
From: duketrt
Date: Wed, 13 Aug 1980 09:48
Date: Wed, 13 Aug 1980 09:48
11 lines
631 bytes
631 bytes
The buffer-flush bug in col(1) that was mentioned in previous news is due to using an automatic (local) variable for buffering stdout: char fbuff[BUFSIZ]; should be changed to static char fbuff[BUFSIZ]; (exit() also works since main() will not return before flushing.) Col(1) is just one of several V7 programs with this flaw. In the Duke version of stdio one can bypass the problem with setbuf(stdout, SYSBUF); where SYSBUF is a flag indicating buffering is desired.
Technical Details
Message-ID:
<anews.Aduke.488>Path:
arc1-ca.pugleaf.net!utzoo!duke!trtShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!duke!trt From: duke!trt Newsgroups: NET.v7bugs Subject: col Date: Wed, 13 Aug 1980 09:48:33 +0000 Message-ID: <anews.Aduke.488>