summaryrefslogtreecommitdiff
path: root/userspace/init.c
diff options
context:
space:
mode:
Diffstat (limited to 'userspace/init.c')
-rw-r--r--userspace/init.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/userspace/init.c b/userspace/init.c
index bd72ecf..7e58589 100644
--- a/userspace/init.c
+++ b/userspace/init.c
@@ -21,8 +21,13 @@ int main(int argc, char **argv)
printf("fool-init: pid: %i\n",pid);
int status;
+ if(pid==1)
+ {
+ printf("fool-init: pid: %i\n",pid);
+ }
if(pid==0)
{
+ printf("fool-init: pid: %i\n",pid);
_execve("/bin/foolshell",argv1,env1); // replace process with our foolshell :)
//execve("/bin/clear",argv,env); // replace process with our foolshell :)
puts("FATAL ERROR: Something terrible happened. Unable to Execute SHELL!");
@@ -31,6 +36,7 @@ int main(int argc, char **argv)
// wait until our child process state changes (exits)
// and respawn SHELL
+ while(1);
_wait(&status);
printf("fool-init: catched exit of process %d.\n",pid);