diff options
| author | Miguel <m.i@gmx.at> | 2018-09-21 12:56:51 +0200 |
|---|---|---|
| committer | Miguel <m.i@gmx.at> | 2018-09-21 12:56:51 +0200 |
| commit | c298ca7e6beaad0bcc32af6d4cf50d41b79f13b7 (patch) | |
| tree | b28e9c052cff3264439cad3c41b29262c60ba6ac /userspace/init.c | |
| parent | f5281689c95758f17628f0286e0265ecf3385a8e (diff) | |
fix framebufffer/ textmode and clean userspace a little bit more
Diffstat (limited to 'userspace/init.c')
| -rw-r--r-- | userspace/init.c | 16 |
1 files changed, 7 insertions, 9 deletions
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; } |
