Wichert Akkerman | 76baf7c | 1999-02-19 00:21:36 +0000 | [diff] [blame] | 1 | #include <signal.h> |
2 | main() | ||||
3 | { | ||||
4 | char buf[1024]; | ||||
5 | void interrupt(); | ||||
6 | |||||
7 | signal(SIGINT, interrupt); | ||||
8 | read(0, buf, 1024); | ||||
9 | write(2, "qwerty\n", 7); | ||||
10 | exit(0); | ||||
11 | } | ||||
12 | |||||
13 | interrupt() | ||||
14 | { | ||||
15 | write(2, "xyzzy\n", 6); | ||||
16 | } |