Now starts consoled instead of a shell directly.

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@11380 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
Axel Dörfler
2005-02-15 01:17:52 +00:00
parent 6220942760
commit 23cf00de23
+3 -18
View File
@@ -21,7 +21,7 @@ setup_io(void)
close(i); close(i);
} }
open("/dev/console", O_RDONLY, 0); /* stdin */ open("/dev/keyboard", O_RDONLY, 0); /* stdin */
open("/dev/console", O_WRONLY, 0); /* stdout */ open("/dev/console", O_WRONLY, 0); /* stdout */
open("/dev/console", O_WRONLY, 0); /* stderr */ open("/dev/console", O_WRONLY, 0); /* stderr */
} }
@@ -32,10 +32,10 @@ main(int argc, char **argv)
{ {
setup_io(); setup_io();
printf("Welcome to Haiku!\n"); printf("Welcome to Haiku!\r\n");
{ {
const char *args[] = {"fortune", NULL}; const char *args[] = {"consoled", NULL};
thread_id thread; thread_id thread;
thread = load_image(1, args, (const char **)environ); thread = load_image(1, args, (const char **)environ);
@@ -46,21 +46,6 @@ main(int argc, char **argv)
printf("Failed to create a team for fortune.\n"); printf("Failed to create a team for fortune.\n");
} }
while (1) {
const char *args[] = {"shell", NULL};
thread_id thread;
thread = load_image(1, args, (const char **)environ);
if (thread >= B_OK) {
status_t returnCode;
printf("init: spawned shell, pid 0x%lx\n", thread);
wait_for_thread(thread, &returnCode);
printf("init: shell exited with return code %ld\n", returnCode);
} else
printf("Failed to start a shell :(\n");
}
printf("init exiting\n"); printf("init exiting\n");
return 0; return 0;