resize timeout handling / grabbing size from stderr doubt

Bernhard Fischer rep.dot.nop at gmail.com
Thu Mar 15 08:12:23 UTC 2007


On Wed, Mar 14, 2007 at 11:52:47PM +0100, Denis Vlasenko wrote:
>On Wednesday 14 March 2007 09:13, Bernhard Fischer wrote:
>> >I must admit that I didn't know that new.c_cc[VTIME] exists,
>> >let alone what does it mean.
>> 
>> It's the timeout for a write.
>> I don't know how i would be able to reproduce such a write-error?
>
>We need to guard against _read_ timeout here

As pgf already pointed out correctly, it's really the timeout of the
*read*, and _not_ the write as i incorrectly said.
This means that the timeout doesn't need to pull in alarm(). I'll change
this if i find the time..

>(when terminal doesn't return encoded sequence with [height, width])
>This is easy to reproduce. redirect relevant descriptor to non-terminal:
>
># sleep 100 | resize
><<< waits 100 seconds >>>
>COLUMNS=0;LINES=0;export COLUMNS LINES;

[snip brainfart of mine wrt stdout]

>This leaves us with two possibilities:
>a) write esc sequences to *stderr*, read response from stdin.
>b) open "/dev/tty" do both writes and reads on it.

ack. so a) is fine, thanks for your patience



More information about the busybox mailing list