summaryrefslogtreecommitdiff
path: root/libc/tests/ouch.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc/tests/ouch.c')
-rw-r--r--libc/tests/ouch.c27
1 files changed, 0 insertions, 27 deletions
diff --git a/libc/tests/ouch.c b/libc/tests/ouch.c
deleted file mode 100644
index c2925c6..0000000
--- a/libc/tests/ouch.c
+++ /dev/null
@@ -1,27 +0,0 @@
-
-#include <signal.h>
-#include <stdio.h>
-#include <errno.h>
-
-void trap()
-{
- write(1, "Ouch!!\n", 7);
-}
-
-main()
-{
- char buf[2];
- int cc;
-
- signal(SIGINT, trap);
- while( (cc=read(0, buf, 1)) > 0 || (cc == -1 && errno == EINTR) )
- {
- if( cc < 0 )
- fprintf(stderr, "INTR\n");
- else
- fprintf(stderr, "%x\n", buf[0]);
- }
-
-
- write(1, "\nExit!\n", 7);
-}