Revision f64622c4 os-posix.c

b/os-posix.c
62 62
    sigaction(SIGPIPE, &act, NULL);
63 63
}
64 64

  
65
static void termsig_handler(int signal)
65
static void termsig_handler(int signal, siginfo_t *info, void *c)
66 66
{
67
    qemu_system_shutdown_request();
67
    qemu_system_killed(info->si_signo, info->si_pid);
68 68
}
69 69

  
70 70
static void sigchld_handler(int signal)
......
77 77
    struct sigaction act;
78 78

  
79 79
    memset(&act, 0, sizeof(act));
80
    act.sa_handler = termsig_handler;
80
    act.sa_sigaction = termsig_handler;
81
    act.sa_flags = SA_SIGINFO;
81 82
    sigaction(SIGINT,  &act, NULL);
82 83
    sigaction(SIGHUP,  &act, NULL);
83 84
    sigaction(SIGTERM, &act, NULL);

Also available in: Unified diff