Пример #1
0
// user_main - kernel thread used to exec a user program
static int
user_main(void *arg) {
#ifdef TEST
#ifdef TESTSCRIPT
    KERNEL_EXECVE3(TEST, TESTSCRIPT);
#else
    KERNEL_EXECVE2(TEST);
#endif
#else
    KERNEL_EXECVE(sh);
#endif
    kprintf("user_main execve failed, no /bin/sh?.\n");
}
Пример #2
0
// user_main - kernel thread used to exec a user program
static int user_main(void *arg)
{
	sysfile_open("stdin:", O_RDONLY);
	sysfile_open("stdout:", O_WRONLY);
	sysfile_open("stdout:", O_WRONLY);
#ifdef UNITTEST
#ifdef TESTSCRIPT
	KERNEL_EXECVE3(UNITTEST, TESTSCRIPT);
#else
	KERNEL_EXECVE2(UNITTEST);
#endif
#else
	__KERNEL_EXECVE("/bin/sh", "/bin/sh");
#endif
	kprintf("user_main execve failed, no /bin/sh?.\n");
}