regression: elf loading
[lunaix-os.git] / lunaix-os / uprog / init.c
1 #include <fcntl.h>
2 #include <sys/lunaix.h>
3 #include <unistd.h>
4
5 int
6 main(int argc, const char** argv)
7 {
8     int errno = 0;
9
10     if ((errno = open("/dev/tty", 0)) < 0) {
11         syslog(2, "fail to open tty (%d)\n", errno);
12         return 0;
13     }
14
15     if ((errno = dup(errno)) < 0) {
16         syslog(2, "fail to setup tty i/o (%d)\n", errno);
17         return 0;
18     }
19
20     syslog(0, "(%p) user space!\n", main);
21
22     return 0;
23 }