Advertisement
Guest User

Untitled

a guest
Mar 26th, 2015
173
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. how to make processes and they do different assign tasks.i have written the code
  2. #include<iostream>
  3. using namespace std;
  4. int main()
  5. int status=0;
  6. {
  7. for(int i=0;i<5;i++)
  8. {
  9. if(fork()==0)
  10. { cout<<"do some thing"<<endl; }
  11. else
  12.  
  13. {wait(status); }
  14.  
  15.  
  16. }
  17.  
  18. return 0;
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement