Advertisement
HimikoWerckmeister

Untitled

Apr 17th, 2016
81
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. hat's what i thought
  2. root@debian-amd64:~/test# ps
  3. PID TTY TIME CMD
  4. 1932 ttyS0 00:00:00 login
  5. 1934 ttyS0 00:00:06 bash
  6. 2785 ttyS0 00:00:00 proc_test2
  7. 2786 ttyS0 00:00:00 proc_test2
  8. 2801 ttyS0 00:00:00 ps
  9.  
  10.  
  11. proc_test2 is main.c
  12. 2789 (process_ancesto):
  13. state: 0
  14. uid: 0
  15. nvcsw: 0
  16. nivcsw: 6
  17. num_children: 0
  18. num_siblings: 2
  19. 1934 (bash):
  20. state: 1
  21. uid: 0
  22. nvcsw: 749
  23. nivcsw: 2294
  24. num_children: 2
  25. num_siblings: 1
  26. my guess is that process_ancestor is the child of bash
  27. because i run it from bash
  28. by that logic, main.c is also a child of bash
  29. why would the forked process created in main.c not also be a child of bash?
  30. and therefore a sibling of process_ancestor?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement