blob: 60a9dc9e3dc097cab9127ee533029be0b2212004 [file] [log] [blame]
Denys Vlasenko8ed57272009-02-25 14:24:02 +00001#include <stdlib.h>
Wichert Akkerman76baf7c1999-02-19 00:21:36 +00002#include <signal.h>
Denys Vlasenko8ed57272009-02-25 14:24:02 +00003
4void interrupt()
5{
6 write(2, "xyzzy\n", 6);
7}
8
9int main(int argc, char *argv[])
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000010{
11 char buf[1024];
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000012
13 signal(SIGINT, interrupt);
14 read(0, buf, 1024);
15 write(2, "qwerty\n", 7);
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000016
Denys Vlasenko8ed57272009-02-25 14:24:02 +000017 return 0;
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000018}