On Fri, Feb 3, 2012 at 9:15 AM, Raymond Toy <toy.raymond@gmail.com> wrote:
NSIG = 65 and LONG_BIT = 32 on my machine, so memcpy only copies 2 bytes. I think we really want to copy at least 64 bits or 8 bytes. If I modify this code to copy 8 bytes, SigBlk is now 0 after returning, and C-c continues to work.
This looks like my fault http://common-lisp.net/gitweb?p=projects/cmucl/cmucl.git;a=commit;h=342beebb... LONG_BIT should have been CHAR_BIT. I am surprised that the C library NSIG is now 65. When I made this change, the C library on the machine I used defined NSIG as 1024 but the kernel data structure knew it was 64. For example, compare http://lxr.linux.no/#linux+v3.2.4/arch/x86/include/asm/signal.h with http://fxr.watson.org/fxr/source/sysdeps/unix/sysv/linux/bits/signum.h?v=GLI... Using the wrong definition of NSIG may cause a corruption.