From bcd07d2b3161364fbffa42d0d9752a1f6581b713 Mon Sep 17 00:00:00 2001 From: Miguel Date: Wed, 12 Sep 2018 16:04:15 +0200 Subject: added support for .S --- userspace/init.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'userspace/init.c') 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); -- cgit v1.2.3