Curses bug in halfdelay() ?

D'Arcy J.M. Cain darcy at druid.uucp
Sun Dec 30 02:35:28 AEST 1990


In article <17070 at brahms.udel.edu> Ken Weaverling writes:
>In article <17068 at brahms.udel.edu> I (Ken Weaverling) write:
>>I am trying to get the halfdelay() routine in curses to implement a timeout
>>on a getch() call. It simply blocks and doesn't return. This same test program
>Is it a safe work-around for me to use alarm() and trap the alarm signal? 
>What I would do is call alarm() right before the getch() and trap the alarm
>signal, then set a flag in it and return. The getch() would be terminated
>after the timeout period.  Or is there a better method? Again, using nodelay
>would force me to poll getch() and that would chew CPU cycles needlessly...

Here's a radical thought.  Complain to your vendor that the product is broken
and have them fix it.  I use ESIX and when I reported the problem they
fixed it and sent me a new copy of the library.

-- 
D'Arcy J.M. Cain (darcy at druid)     |
D'Arcy Cain Consulting             |   There's no government
West Hill, Ontario, Canada         |   like no government!
+1 416 281 6094                    |



More information about the Comp.unix.sysv386 mailing list