]> code.citadel.org Git - citadel.git/blob - webcit/testing.c
b1405f4ceaef721c69c82121f888cc4c71b56741
[citadel.git] / webcit / testing.c
1 #include <stdlib.h>
2 #include <unistd.h>
3 #include <stdio.h>
4 #include <fcntl.h>
5
6 main() {
7         int fdin, fdout;
8         char buf[256];
9
10         fdin = open("/dev/tty10", O_RDONLY);
11         fdout = open("/dev/tty10", O_WRONLY);
12         dup2(fdin, 0);
13         dup2(fdout, 1);
14         printf("Hello world: ");
15         gets(buf);
16         printf("Ok then... %s\n", buf);
17         exit(0);
18         }