On 8/6/2012 2:07 PM, Daniel Colascione wrote:
> I just saw a hang building Emacs (using "make bootstrap")

Signal handling appears to be broken. Here's a simple testcase. Run the program
and hit control-c. It'll print "got Alarm clock", then stop accepting any
signals at all, even SIGSTOP. The same program works fine on my Debian stable 
box.

#define _GNU_SOURCE 1
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <signal.h>
#include <pthread.h>

int
main()
{
    sigset_t waitmask;
    int sig;

    sigemptyset (&waitmask);
    sigaddset (&waitmask, SIGINT);
    sigprocmask (SIG_BLOCK, &waitmask, NULL);

    for (;;) {
        sig = sigwaitinfo (&waitmask, NULL);
        fprintf (stderr, "got %s\n", sys_siglist[sig]);
        if (sig == SIGINT) {
            break;
        }
    }

    return 0;
}

Attachment: signature.asc
Description: OpenPGP digital signature

Reply via email to