[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    [BusyBox] ash's read -t/read -n
From:       Paul Fox <pgf () brightstareng ! com>
Date:       2005-04-15 22:14:30
Message-ID: 22072.1113603270 () brightstareng ! com
[Download RAW message or body]

a couple of days ago, i wrote:

 > i just diffed the 1.00 sources against the current svn tree, and
 > there have been a smattering of fixes done, but very few,
 > considering the overall passage of time.  (ironically, one of the
 > changes that _is_ in there ("read -t" in ash) is something that
 > doesn't appear in the bug system, was never discussed on the list
 > that i can find, and was something i was just today planning on
 > implementing.  i'm glad i checked.  :-)

when i started trying to use the feature as implemented in the
svn tree, i found that it behaved quite differently than in
bash -- it seems to wait for the first character to be available,
in raw mode, rather than waiting for fully-formed user input to
be available, in cooked mode.  i.e. if you type "hello<CR>" at a
"read -t 5 foo" command, unless you type the <CR> before 5
seconds has passed, $foo won't get anything at all (using bash). 
that's not what the commited code does -- if you type anything at
all, it decides you'll be finishing, and waits forever.

while that might be useful somewhere, it's not what i needed, so
i reimplemented -t, and added -n, since i needed that too.

anyway, i have a working, tested patch that implements -t and -n
in a bash-compatible way.  i'll be submitting it to the bug
system so it doesn't get lost, but before i do, i wanted to
be sure that the existing behavior wasn't done for a specific
reason -- maybe there's a compromise somewhere.

anyone know?  (the svn log for ash.c says that "solar" commited
the patch, which was authored by tim yamin in october of last
year.  is either player on the list?)

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


_______________________________________________
busybox mailing list
busybox@mail.busybox.net
http://codepoet.org/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic