Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- hat's what i thought
- root@debian-amd64:~/test# ps
- PID TTY TIME CMD
- 1932 ttyS0 00:00:00 login
- 1934 ttyS0 00:00:06 bash
- 2785 ttyS0 00:00:00 proc_test2
- 2786 ttyS0 00:00:00 proc_test2
- 2801 ttyS0 00:00:00 ps
- proc_test2 is main.c
- 2789 (process_ancesto):
- state: 0
- uid: 0
- nvcsw: 0
- nivcsw: 6
- num_children: 0
- num_siblings: 2
- 1934 (bash):
- state: 1
- uid: 0
- nvcsw: 749
- nivcsw: 2294
- num_children: 2
- num_siblings: 1
- my guess is that process_ancestor is the child of bash
- because i run it from bash
- by that logic, main.c is also a child of bash
- why would the forked process created in main.c not also be a child of bash?
- and therefore a sibling of process_ancestor?
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement