strace/test/sig.c
1999-02-19 00:21:36 +00:00

17 lines
195 B
C

#include <signal.h>
main()
{
char buf[1024];
void interrupt();
signal(SIGINT, interrupt);
read(0, buf, 1024);
write(2, "qwerty\n", 7);
exit(0);
}
interrupt()
{
write(2, "xyzzy\n", 6);
}