FACT++  1.0
int main ( int  ,
char **   
)

Definition at line 81 of file dim_fork2.cxx.

References Parent::fork_em(), Parent::is_parent, Parent::print(), and Parent::update().

81  {
82  Parent p;
83  ::sleep(5);
84  p.fork_em();
85  while(1) {
86  p.update();
87  ::sleep(1);
88  if ( p.is_parent ) {
89  p.print();
90  }
91  }
92  ::printf("Process %d exiting\n",::getpid());
93  return 1;
94 }
int is_parent
Definition: dim_fork2.cxx:24
void update()
Definition: dim_fork2.cxx:33
void fork_em()
Definition: dim_fork2.cxx:47
void print()
Definition: dim_fork2.cxx:37

+ Here is the call graph for this function: