summaryrefslogtreecommitdiff
path: root/userspace/init.c
diff options
context:
space:
mode:
authorMiguel <m.i@gmx.at>2018-10-04 02:17:13 +0200
committerMiguel <m.i@gmx.at>2018-10-04 02:17:13 +0200
commit81a8252db679351f5ba388b420519724c9c2c2be (patch)
treed21bb88fb36f9492c0daf14d67c46f0b22b66def /userspace/init.c
parentce16fe524c14ccaae67fb634105da5aef08ead48 (diff)
reverting userspace idea
Diffstat (limited to 'userspace/init.c')
-rw-r--r--userspace/init.c29
1 files changed, 23 insertions, 6 deletions
diff --git a/userspace/init.c b/userspace/init.c
index d130bc8..7237fdc 100644
--- a/userspace/init.c
+++ b/userspace/init.c
@@ -5,18 +5,35 @@
int main(int argc, char **argv)
{
- // int x=10/0; // provoke divide by zero
+ // loop forever and spawn shells if the top-shell exits
+
+ int pid=_fork();
- uint8_t *mem=0xf6000000;
- *mem='a';
- while(1);
+ if(pid==0)
+ {
+ _execve("/bin/pain1",NULL,NULL);
+ }
+ else
+ {
+ int pid=_fork();
+ if(pid==0)
+ {
+ _execve("/bin/pain2",NULL,NULL);
+ }
+ else
+ {
+ _execve("/bin/pain3",NULL,NULL);
+ }
+ }
+
+
+ return 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};
-
-
// loop forever and spawn shells if the top-shell exits
while(1)
{