3 #include <sys/lunaix.h>
7 main(int argc, const char** argv)
11 if ((errno = open("/dev/tty", 0)) < 0) {
12 syslog(2, "fail to open tty (%d)\n", errno);
16 if ((errno = dup(errno)) < 0) {
17 syslog(2, "fail to setup tty i/o (%d)\n", errno);
21 printf("(%p) user space!\n", (void*)main);
24 if (!(pid = fork())) {
25 int err = execve("/mnt/lunaix-os/usr/sh", NULL, NULL);
26 printf("fail to execute (%d)\n", err);
30 waitpid(pid, NULL, 0);