From c298ca7e6beaad0bcc32af6d4cf50d41b79f13b7 Mon Sep 17 00:00:00 2001 From: Miguel Date: Fri, 21 Sep 2018 12:56:51 +0200 Subject: fix framebufffer/ textmode and clean userspace a little bit more --- userspace/init.c | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'userspace/init.c') diff --git a/userspace/init.c b/userspace/init.c index 8530368..0a3b870 100644 --- a/userspace/init.c +++ b/userspace/init.c @@ -3,21 +3,19 @@ int main(int argc, char **argv) { - char *argv1[]={"/bin/foolshell",0}; + char *argv1[]={"/bin/fsh",0}; char *env1[]={"HOME=/home/miguel","PS1=\033[34m$\033[37m","PWD=/home/miguel","PATH=/bin","TERM=fool-term",0}; - time_t ltime; - time(<ime); - printf("fool-init: current time: %s\n", ctime(<ime)); - // loop forever and spawn shells if the top-shell exits while(1) { int pid=_fork(); + if(pid==0) { - _execve("/bin/foolshell",argv1,env1); // replace process with our foolshell :) + printf("fool-init: spawning fool-shell\n"); + _execve("/bin/fsh",argv1,env1); // replace process with our foolshell :) while(1) puts("FATAL ERROR: Something terrible happened. Unable to Execute SHELL!\n"); } @@ -25,9 +23,9 @@ int main(int argc, char **argv) // and respawn SHELL _wait(pid); - printf("fool-init: catched exit of process %d.\n",pid); - printf("fool-init: respawning a new fool-shell\n"); - } + printf("fool-init: respawning new fool-shell\n"); + + } return 0; } -- cgit v1.2.3