K, so I’m currently working on an application that, if the user doesn’t provide 
any options/operands, reads from STDIN, like GNU cat.  I just finished adding 
signal-handling for SIGINT (Ctrl-c), however, now whenever I press Ctrl-c 
nothing happens because (read-char) hangs until I press enter.  Is there a way 
to use (read-char) that won’t make it hang?  Maybe something like: (if 
(not-null? (peek-char)) (read-char))?  I saw that (char-ready?) is supposed to 
prevent the next call to (read-char) from hanging, but (while I’m sure that 
(char-ready?) in fact works) I can’t seem to get it to work.  

Anyone have any experience with this kind of issue; would using (read-line) 
instead of (read-char) make a positive difference?  (I doubt it would)
-- 
Alexej Magura
Sent with Airmail
_______________________________________________
Chicken-users mailing list
Chicken-users@nongnu.org
https://lists.nongnu.org/mailman/listinfo/chicken-users

Reply via email to