summaryrefslogtreecommitdiff
path: root/src/generic/evas/common/timeout.c
blob: 6d52aa9609e3cff11035e3d18ed3880bc0d3d081 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <unistd.h>
#include <signal.h>

static void
_timeout(int val)
{
   _exit(-1);
   if (val) return;
}

void
timeout_init(int seconds)
{
   signal(SIGALRM, _timeout);
   alarm(seconds);
}