Skip to content

Commit

Permalink
fork dirty
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivek Anand T Kallampally committed Mar 29, 2012
1 parent e90ac9d commit c055f87
Show file tree
Hide file tree
Showing 8 changed files with 37 additions and 0 deletions.
Binary file added test/exec
Binary file not shown.
9 changes: 9 additions & 0 deletions test/exec.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#include "syscall.h"
void main()
{
int fd;
Print("Hello World\n");
fd=Exec("./test/open");
Print("Hello World after\n");
Halt(); // Optional. Just print stats
}
Binary file added test/exec.coff
Binary file not shown.
Binary file added test/exec.o
Binary file not shown.
Binary file added test/fork
Binary file not shown.
28 changes: 28 additions & 0 deletions test/fork.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
#include "syscall.h"
void p()
{
int i=0;
while(i++ < 10)
Print("Hi");
Exit(0);
}
void func()
{
Print("****hi****\n");
Fork(p);
Print("###############Hey###############\n");
Exit(0);
}
void main()
{
int i=0;
Print("Hello\n");
Fork(func);
// Fork(p);
// Fork(func);
// Join(i);
Print("hello after fork\n");
//Join(1);
//while(i++<10000);
Halt();
}
Binary file added test/fork.coff
Binary file not shown.
Binary file added test/fork.o
Binary file not shown.

0 comments on commit c055f87

Please sign in to comment.