X-Git-Url: https://scm.lunaixsky.com/lunaix-os.git/blobdiff_plain/c316c28e6c8a165111d6bbc208555f5c53489818..db7fc030e9e04c881f5f12a0e23baa8db4e20ee1:/lunaix-os/uprog/init.c diff --git a/lunaix-os/uprog/init.c b/lunaix-os/uprog/init.c new file mode 100644 index 0000000..a197245 --- /dev/null +++ b/lunaix-os/uprog/init.c @@ -0,0 +1,23 @@ +#include +#include +#include + +int +main(int argc, const char** argv) +{ + int errno = 0; + + if ((errno = open("/dev/tty", 0))) { + syslog(2, "fail to open tty (%d)\n", errno); + return 0; + } + + if ((errno = dup(errno))) { + syslog(2, "fail to setup tty i/o (%d)\n", errno); + return 0; + } + + syslog(0, "user space!\n"); + + return 0; +} \ No newline at end of file