23 lines
273 B
C
23 lines
273 B
C
#include <signal.h>
|
|
#include <stdlib.h>
|
|
#include <stdio.h>
|
|
#include <unistd.h>
|
|
|
|
void handler(int sig){
|
|
printf("test");
|
|
exit(0);
|
|
}
|
|
|
|
int main(int argc, char *argv[])
|
|
{
|
|
signal(SIGALRM, handler);
|
|
|
|
|
|
alarm(5);
|
|
|
|
getchar();
|
|
printf("finished without a thing");
|
|
|
|
return 0;
|
|
}
|