From: Vladimir T. <vtz...@gm...> - 2008-11-20 17:11:52
|
Sam, On Nov 20, 2008, at 4:31 PM, Sam Steingold wrote: > Vladimir Tzankov wrote: >> On Nov 20, 2008, at 4:10 PM, Sam Steingold wrote: >>> y-or-n-p-timeout broken: >>> >>> (y-or-n-p-timeout 1 t "y or n") >>> y or n (y/n) n >>> [Timed out] Y >>> T >>> >>> also, while clisp waits for my input, it consumes 100% of CPU >>> (spinlock?) >>> apparently, waiting for user input is an uninterruptible operation. >> strange - it works for me - probably something with signal handling. > I thought so... >> I suppose this is on 64 bit linux? > yes, amd64 There is definitely some problem on AMD64. I am testing on: Linux ubuntu64 2.6.27-7-server #1 SMP Fri Oct 24 07:20:47 UTC 2008 x86_64 GNU/Linux and observe that only calls with timeout less (or equal to) 1 second behave as expected. If the timeout is greater than 1 second - SIGALRM is not delivered (ualarm() from signal handling thread). However I do not experience the same as you - no 100% CPU and (y-or-n- p-timeout 1 t "y or n") works as expected (but not if I set the timeout to 1.1). On 32 bit system - everything is fine. Vladimir |