I was building the current OpenSSL_0_9_7-stable branch on my Solaris 8 box and noticed after running config my terminal kept scrolling ...... [EMAIL PROTECTED] 52% Use "logout" to logout. [EMAIL PROTECTED] 52% Use "logout" to logout. ......
I tracked it down to this line. (stty -icanon min 0 time 50; read waste) < /dev/tty
Huh? Just for the record. That line actually originated on Solaris for a *long* time ago... And it was in use on several platforms since then... So how come the problem arises now? What is your shell?
It arises now because I'm now using gcc 3.4.3 (was 2.95.2) on a 64bit machine.
How is it related to compiler? Oh! Do you mean that ./config script *started* to give you an option to build 64-bit only *now*? Makes sense...
I'm using the C shell.
Well, the original intention was/is to rely upon your shell [the one that gives you prompt] to do that, to save and restore stty settings that is. At the very least those I've tested do save and scrupulously restore them *even* if I kill ./config script with -KILL signal without giving it a chance to clean up.
I don't know what systems you tested,
At the time the line was introduced it was tested under SPARC Solaris 7, IRIX 6.5 and later on under HP-UX 11. I've just performed independent tests on Tru64 and x86 Linux 2.x... But it seems that I might have fallen victim to my individual habits:-( All tests were made with tcsh, interactive shell of personal choice. In interactive mode tcsh does take care of stty settings, but not others... Oops:-)
Something like this is more appropriate.
STTY=`stty -g` trap "stty $STTY" 2 (stty -icanon min 0 time 50; read waste) < /dev/tty stty $STTY
Have you wondered why is "< /dev/tty" there? Because standard input in that particular place is a pipe, something you can't pull stty upon. So that suggested addition does exactly nothing:-) But once again, one should rather
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Another test ..... $ stty -a > /tmp/1 $ cat >/tmp/x STTY=`stty -g` trap "stty $STTY" 2 (stty -icanon min 0 time 50; read waste) < /dev/tty stty $STTY $ sh /tmp/x $ stty -a > /tmp/2 $ diff /tmp/1 /tmp/2
Once again, *in the context of ./config script* saving stty settings as proposed does exactly nothing [as you can't pull stty on pipe]. Following should be more appropriate:
(trap "stty `stty -g`" 2 0; stty -icanon ...) < /dev/tty
A. ______________________________________________________________________ OpenSSL Project http://www.openssl.org Development Mailing List [email protected] Automated List Manager [EMAIL PROTECTED]
