mirror of
https://github.com/qemu/qemu.git
synced 2024-11-25 03:43:37 +08:00
c09015dd04
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com> Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
27 lines
355 B
C
27 lines
355 B
C
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
#include <signal.h>
|
|
#include <unistd.h>
|
|
|
|
#define MAGIC (0xdeadbeef)
|
|
|
|
int s = 0;
|
|
void sighandler(int sig)
|
|
{
|
|
s = MAGIC;
|
|
}
|
|
|
|
int main(int argc, char **argv)
|
|
{
|
|
int p;
|
|
|
|
p = getpid();
|
|
signal(SIGALRM, sighandler);
|
|
kill(p, SIGALRM);
|
|
if (s != MAGIC)
|
|
return EXIT_FAILURE;
|
|
|
|
printf ("passed\n");
|
|
return EXIT_SUCCESS;
|
|
}
|