blob: 1678b0227aff78499f1f43e558b21504f06b3ba3 [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>
Mike Frysingerb51ce622013-05-02 15:43:45 -04003#include <unistd.h>
Denys Vlasenko8ed57272009-02-25 14:24:02 +00004
5void interrupt()
6{
7 write(2, "xyzzy\n", 6);
8}
9
10int main(int argc, char *argv[])
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000011{
12 char buf[1024];
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000013
14 signal(SIGINT, interrupt);
15 read(0, buf, 1024);
16 write(2, "qwerty\n", 7);
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000017
Denys Vlasenko8ed57272009-02-25 14:24:02 +000018 return 0;
Wichert Akkerman76baf7c1999-02-19 00:21:36 +000019}