Article View: comp.unix.programmer
Article #994Interruptable curses 'getch'.
From: Thomas Vachuska
Date: Mon, 08 Oct 1990 20:57
Date: Mon, 08 Oct 1990 20:57
22 lines
1179 bytes
1179 bytes
Hello...
I was wondering if anyone knows how to coerce 'curses' routine 'getch' to
return with an abnormal status (say -1) after the process receives an interrupt.
This is similar to the semantics of a 'read' call on a slow (tty) device.
The function 'getch' returns -1 if the 'nodelay' is active (for the
particular window), and I'm aware that there is a workaround solution for my
problem by using the 'nodelay' feature, but I'm not willing to pay the CPU
penalty assiciated with polling for input. Next alternative that I considered
is to write 'getich' (or interruptable version of getch) but I figured that
before I do so, I should try to tap the well of your experience and knowledge.
So if anyone has encountered this before and you have a solution, please
let me know.
Thanks
Thomas Vachuska
Technical Details
Message-ID:
<42480001@hprmokg.HP.COM>Path:
arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!sdd.hp.com!hplabs!hpda!hpcupt1!hprnd!hprmokg!tomShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!attcan!uunet!wuarchive!sdd.hp.com!hplabs!hpda!hpcupt1!hprnd!hprmokg!tom From: tom@hprmokg.HP.COM (Thomas Vachuska) Newsgroups: comp.unix.programmer Subject: Interruptable curses 'getch'. Message-ID: <42480001@hprmokg.HP.COM> Date: 8 Oct 90 20:57:47 GMT Organization: HP Networked Computer Mfg. Operation Lines: 22