diff options
author | Mattias Andrée <maandree@kth.se> | 2020-06-01 15:23:05 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@kth.se> | 2020-06-01 15:23:05 +0200 |
commit | 3b401b823ca98e6329450874eadeaa5f5c120cd1 (patch) | |
tree | 45bbac972b106f6fb1c8e2c48d3b937f7e169077 /tests/signal.c | |
parent | Use WCOREDUMP rather than __WCOREDUMP (diff) | |
download | sctrace-3b401b823ca98e6329450874eadeaa5f5c120cd1.tar.gz sctrace-3b401b823ca98e6329450874eadeaa5f5c120cd1.tar.bz2 sctrace-3b401b823ca98e6329450874eadeaa5f5c120cd1.tar.xz |
Add tests for manually testing
Signed-off-by: Mattias Andrée <maandree@kth.se>
Diffstat (limited to 'tests/signal.c')
-rw-r--r-- | tests/signal.c | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/tests/signal.c b/tests/signal.c new file mode 100644 index 0000000..e4862cd --- /dev/null +++ b/tests/signal.c @@ -0,0 +1,18 @@ +#include <signal.h> +#include <unistd.h> + +static void +interrupt() +{ + write(-2, "xyzzy\n", 6); +} + +int +main(void) +{ + signal(SIGINT, interrupt); + kill(getpid(), SIGINT); + usleep(100000U); + write(-1, "qwerty\n", 7); + return 0; +} |