summaryrefslogtreecommitdiff
path: root/test/sig.c
diff options
context:
space:
mode:
Diffstat (limited to 'test/sig.c')
-rw-r--r--test/sig.c16
1 files changed, 16 insertions, 0 deletions
diff --git a/test/sig.c b/test/sig.c
new file mode 100644
index 0000000..930a177
--- /dev/null
+++ b/test/sig.c
@@ -0,0 +1,16 @@
+#include <signal.h>
+main()
+{
+ char buf[1024];
+ void interrupt();
+
+ signal(SIGINT, interrupt);
+ read(0, buf, 1024);
+ write(2, "qwerty\n", 7);
+ exit(0);
+}
+
+interrupt()
+{
+ write(2, "xyzzy\n", 6);
+}