mirror of
https://github.com/xemu-project/xemu.git
synced 2024-11-29 14:30:36 +00:00
cbdbb7713d
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3998 c046a42c-6fe2-441c-8c8c-71466251a162
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;
|
|
}
|