resize timeout handling / grabbing size from stderr doubt

Paul Fox pgf at brightstareng.com
Wed Mar 14 06:37:28 PDT 2007


bernhard wrote:
 > 
 > Re: your change to use stderr to grab the winsize.
 > Is the winsize guaranteed to be equal for stdout and stderr for a given
 > process?
 > 
 > What about this scenario:
 > stdout/stdin comes from /dev/fb0 which is 80x24 and stderr is redirected
 > to /dev/fb1 which is (random numbers) 123x96 ?

the original (traditional0 resize program didn't probe either of
those.  it opened /dev/tty, and sent its probes and read its
responses from there.  informational output (i.e.  shell variable
settings) was sent to stdout.

this seems like the correct behavior to me.

as for the timeout:
 > >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.

actually, it's the timeout for a read.  if no characters arrive within
the specified time, the read will return anyway.

 > I don't know how i would be able to reproduce such a write-error ?

read timeouts are fairly easy to reproduce.  :-)

paul
=---------------------
 paul fox, pgf at brightstareng.com


More information about the busybox mailing list