diff options
author | Balint Reczey <balint@balintreczey.hu> | 2013-10-20 17:28:25 +0200 |
---|---|---|
committer | Balint Reczey <balint@balintreczey.hu> | 2013-10-20 17:28:29 +0200 |
commit | 1f938d9642149694ed71dcf4ac89a3dadf7c6146 (patch) | |
tree | c2983fc648edccbd290bf3c0a3cb41e5b63b5d96 | |
parent | 5fb86ae1782dabafa1dafc0fffcf138e1dff453e (diff) | |
download | faketime-ng-1f938d9642149694ed71dcf4ac89a3dadf7c6146.tar.gz |
Use SIGUSR1 instead of SIGRTMIN in tests
This will probably fix compilation on Debian GNU/Hurd
-rw-r--r-- | test/timetest.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/test/timetest.c b/test/timetest.c index a9cf94a..dda0107 100644 --- a/test/timetest.c +++ b/test/timetest.c @@ -35,6 +35,8 @@ #define VERBOSE 0 +#define SIG SIGUSR1 + static void handler(int sig, siginfo_t *si, void *uc) { @@ -70,15 +72,15 @@ int main (int argc, char **argv) { sa.sa_flags = SA_SIGINFO; sa.sa_sigaction = handler; sigemptyset(&sa.sa_mask); - if (sigaction(SIGRTMIN, &sa, NULL) == -1) { + if (sigaction(SIGUSR1, &sa, NULL) == -1) { perror("sigaction"); exit(EXIT_FAILURE); } /* Block timer signal temporarily */ - printf("Blocking signal %d\n", SIGRTMIN); + printf("Blocking signal %d\n", SIGUSR1); sigemptyset(&mask); - sigaddset(&mask, SIGRTMIN); + sigaddset(&mask, SIGUSR1); if (sigprocmask(SIG_SETMASK, &mask, NULL) == -1) { perror("sigaction"); exit(EXIT_FAILURE); @@ -86,7 +88,7 @@ int main (int argc, char **argv) { /* Create the timer */ sev.sigev_notify = SIGEV_SIGNAL; - sev.sigev_signo = SIGRTMIN; + sev.sigev_signo = SIGUSR1; sev.sigev_value.sival_ptr = &timerid1; if (timer_create(CLOCK_REALTIME, &sev, &timerid1) == -1) { perror("timer_create"); |