Межпроцессные коммуникации – использование общей памяти, страница 5

Child #1 (PID=5146) SEND "m" to parent (with PPID=5144). Current time: Tue Jun  1 18:09:07 2004

Parent (PID=5144) RECV "m" from child #1. Current time: Tue Jun  1 18:09:07 2004

Parent (PID=5144) SEND "2" to child #1. Current time: Tue Jun  1 18:09:07 2004

Child #1 (PID=5146) RECV "2" from parent (with PPID=5144). sum=8. Current time: Tue Jun  1 18:09:07 2004

Child #0 (PID=5145) SEND "m" to parent (with PPID=5144). Current time: Tue Jun  1 18:09:08 2004

Parent (PID=5144) RECV "m" from child #0. Current time: Tue Jun  1 18:09:08 2004

Parent (PID=5144) SEND "3" to child #0. Current time: Tue Jun  1 18:09:08 2004

Child #0 (PID=5145) RECV "3" from parent (with PPID=5144). sum=13. Current time: Tue Jun  1 18:09:08 2004

Child #2 (PID=5147) SEND "m" to parent (with PPID=5144). Current time: Tue Jun  1 18:09:08 2004

Parent (PID=5144) RECV "m" from child #2. Current time: Tue Jun  1 18:09:08 2004

Parent (PID=5144) SEND "2" to child #2. Current time: Tue Jun  1 18:09:08 2004

Child #2 (PID=5147) RECV "2" from parent (with PPID=5144). sum=11. Current time: Tue Jun  1 18:09:08 2004

Child #1 (PID=5146) SEND "m" to parent (with PPID=5144). Current time: Tue Jun  1 18:09:09 2004

Parent (PID=5144) RECV "m" from child #1. Current time: Tue Jun  1 18:09:09 2004

Parent (PID=5144) SEND "0" to child #1. Current time: Tue Jun  1 18:09:09 2004

Child #1 (PID=5146) RECV "0" from parent (with PPID=5144). sum=8. Current time: Tue Jun  1 18:09:09 2004

Child #1 (PID=5146) SEND "m" to parent (with PPID=5144). Current time: Tue Jun  1 18:09:09 2004

Parent (PID=5144) RECV "m" from child #1. Current time: Tue Jun  1 18:09:09 2004

Parent (PID=5144) SEND "4" to child #1. Current time: Tue Jun  1 18:09:09 2004

Child #1 (PID=5146) RECV "4" from parent (with PPID=5144). sum=12. Current time: Tue Jun  1 18:09:09 2004

Child #3 (PID=5148) SEND "m" to parent (with PPID=5144). Current time: Tue Jun  1 18:09:09 2004

Parent (PID=5144) RECV "m" from child #3. Current time: Tue Jun  1 18:09:09 2004

Parent (PID=5144) SEND "2" to child #3. Current time: Tue Jun  1 18:09:09 2004

Child #3 (PID=5148) RECV "2" from parent (with PPID=5144). sum=10. Current time: Tue Jun  1 18:09:09 2004

Child #4 (PID=5149) want to be killed. Current time: Tue Jun  1 18:09:10 2004

!!!KILLED!!! child #4 (PID=5149). Current time: Tue Jun  1 18:09:10 2004

Child #2 (PID=5147) want to be killed. Current time: Tue Jun  1 18:09:10 2004

!!!KILLED!!! child #2 (PID=5147). Current time: Tue Jun  1 18:09:10 2004

Child #0 (PID=5145) want to be killed. Current time: Tue Jun  1 18:09:11 2004

Child #3 (PID=5148) SEND "m" to parent (with PPID=5144). Current time: Tue Jun  1 18:09:11 2004

!!!KILLED!!! child #0 (PID=5145). Current time: Tue Jun  1 18:09:11 2004

Parent (PID=5144) RECV "m" from child #3. Current time: Tue Jun  1 18:09:11 2004

Parent (PID=5144) SEND "2" to child #3. Current time: Tue Jun  1 18:09:11 2004

Child #3 (PID=5148) RECV "2" from parent (with PPID=5144). sum=12. Current time: Tue Jun  1 18:09:11 2004

Child #1 (PID=5146) want to be killed. Current time: Tue Jun  1 18:09:12 2004

!!!KILLED!!! child #1 (PID=5146). Current time: Tue Jun  1 18:09:12 2004

Child #3 (PID=5148) want to be killed. Current time: Tue Jun  1 18:09:12 2004

!!!KILLED!!! child #3 (PID=5148). Current time: Tue Jun  1 18:09:12 2004

The end of main prog (PID=5144). Current time: Tue Jun  1 18:09:12 2004

[serge@localhost lab7]$ ps

PID TTY          TIME CMD

1882 pts/0    00:00:00 bash

5156 pts/0    00:00:00 ps

[serge@localhost lab7]$