Running the following code and typing cntl-c at the prompt results in an
I/O error from stty on Linux, AIX, Solaris.  The version on Linux is
Version AJM 93t+ 2010-02-02; others are ksh88.  Bash does not cause an
stty error.

How can I write similar code (with a pipeline) to avoid this issue?

Thanks!
-- John

#!/bin/ksh
{
   trap 'stty echo; exit 1' INT 
   stty -echo
   printf "prompt: "
   read pw
   stty echo
   trap - INT
   echo "<$pw>" >&2
} | cat 

_______________________________________________
ast-developers mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-developers

Reply via email to