int
main()
{
  int result,pid,i=0;
  char* progs[] = {"add","\0"};
  while(progs[i]!= "\0"){
	  pid=Fork();
	  if(pid==0)	Exec("add");
	  else result= Add(3,4);
	  i++;
	  }
   SysStats();
  Exit(0);
  /* not reached */
}
Example #2
0
int main()
{
  int result,newres,pid,p,a,b,c;
  
  SysStats();
  result = Add(42, 20);
  pid=Fork();
//  a = Fork();
//  b = Fork();
//  c = Fork();
  //  Exit(24);
//  SysStats();
//  if (pid==0)
//    Exec2("./add4");
//  else
//    newres = Add(100,200);
  Add(1,1);
  p = Fork();
  Add(0,0);

  SysStats();
//  Halt();
  /* not reached */
}