Newsgroups: comp.unix.sysv386 Path: utzoo!telly!druid!darcy From: darcy@druid.uucp (D'Arcy J.M. Cain) Subject: Re: Curses bug in halfdelay() ? Organization: D'Arcy Cain Consulting, West Hill, Ontario Distribution: na Date: Sat, 29 Dec 90 15:35:28 GMT Message-ID: <1990Dec29.153528.18008@druid.uucp> Keywords: curses halfdelay bug sysv References: <17068@brahms.udel.edu> <17070@brahms.udel.edu> In article <17070@brahms.udel.edu> Ken Weaverling writes: >In article <17068@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@druid) | D'Arcy Cain Consulting | There's no government West Hill, Ontario, Canada | like no government! +1 416 281 6094 |