diff options
author | Robert de Bath <rdebath@poboxes.com> | 1997-02-25 20:42:19 +0100 |
---|---|---|
committer | Lubomir Rintel <lkundrak@v3.sk> | 2013-10-23 23:38:07 +0200 |
commit | 4c36e9a0c125ccfff37aa440dab2cf58c4152fff (patch) | |
tree | a5d9c84ba2661029ddb2223dacd50529a361c3d5 /libc/tests/ouch.c | |
parent | f8de35da65c5d93bb733073cf40da154bc1c0748 (diff) | |
parent | 9696d7b0e1f3a1b0f5fd4a0428eb75afe8ad4ed6 (diff) | |
download | dev86-4c36e9a0c125ccfff37aa440dab2cf58c4152fff.tar.gz |
Import Dev86src-0.0.11.tar.gzv0.0.11
Diffstat (limited to 'libc/tests/ouch.c')
-rw-r--r-- | libc/tests/ouch.c | 27 |
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); -} |