[TUHS] SYSTEM V R1 HELP

Dave Horsfall dave at horsfall.org
Sat Dec 23 10:19:30 AEST 2017


On Fri, 22 Dec 2017, Random832 wrote:

> I've got it. The problem is with putc (actually _flsbuf), and it is 
> precisely *because* stderr is unbuffered.
>
> #define putc(x, p)	(--(p)->_cnt >= 0 ? \
> 			((int) (*(p)->_ptr++ = (unsigned char) (x))) : \
> 			_flsbuf((unsigned char) (x), (p)))

[...]

That, sir, is one brilliant piece of analysis; well done!  Of course, in 
hindsight it's bleedin' obvious :-)

-- 
Dave Horsfall DTM (VK2KFU)  "Those who don't understand security will suffer."


More information about the TUHS mailing list