aboutsummaryrefslogtreecommitdiffstats
path: root/tests/signal.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2020-06-02 04:20:21 +0200
committerMattias Andrée <maandree@kth.se>2020-06-02 04:20:21 +0200
commitf84d2aebd4d295f08c50b88ed4452f6c9b6605e6 (patch)
treea6a731ac9a99f67021364091426cd58a6c7b0886 /tests/signal.c
parentFix exit status regression ... now I can go back to sleep again (diff)
downloadsctrace-f84d2aebd4d295f08c50b88ed4452f6c9b6605e6.tar.gz
sctrace-f84d2aebd4d295f08c50b88ed4452f6c9b6605e6.tar.bz2
sctrace-f84d2aebd4d295f08c50b88ed4452f6c9b6605e6.tar.xz
Reject i386 and x32 applications (not yet supported)
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to '')
-rw-r--r--tests/signal.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/tests/signal.c b/tests/signal.c
index e4862cd..a68edcd 100644
--- a/tests/signal.c
+++ b/tests/signal.c
@@ -1,4 +1,5 @@
#include <signal.h>
+#include <time.h>
#include <unistd.h>
static void
@@ -10,9 +11,10 @@ interrupt()
int
main(void)
{
+ struct timespec ts = {0, 100000000L};
signal(SIGINT, interrupt);
kill(getpid(), SIGINT);
- usleep(100000U);
+ nanosleep(&ts, NULL);
write(-1, "qwerty\n", 7);
return 0;
}