Знакомство с сигналами ОС Linux и с функциями для работы с ними, страница 3

Parent (PID=2870) SEND "OK" to child #2. Current time: Thu May 27 09:14:54 2004

Child #2 (PID=2878) RECV "OK" (3) from parent (with PPID=2870). Current time: Thu May 27 09:14:54 2004

Child #3 (PID=2879) SEND "4" (4) to parent (with PPID=2870). Current time: Thu May 27 09:14:54 2004

Child #4 (PID=2880) SEND "4" (4) to parent (with PPID=2870). Current time: Thu May 27 09:14:54 2004

Parent (PID=2870) RECV "4" from child #3. Current time: Thu May 27 09:14:54 2004

Parent (PID=2870) SEND "OK" to child #3. Current time: Thu May 27 09:14:54 2004

Child #3 (PID=2879) RECV "OK" (3) from parent (with PPID=2870). Current time: Thu May 27 09:14:54 2004

Parent (PID=2870) RECV "4" from child #4. Current time: Thu May 27 09:14:54 2004

Parent (PID=2870) SEND "OK" to child #4. Current time: Thu May 27 09:14:54 2004

Child #4 (PID=2880) RECV "OK" (3) from parent (with PPID=2870). Current time: Thu May 27 09:14:54 2004

Child #5 (PID=2881) SEND "4" (4) to parent (with PPID=2870). Current time: Thu May 27 09:14:54 2004

Parent (PID=2870) RECV "4" from child #5. Current time: Thu May 27 09:14:54 2004

Parent (PID=2870) SEND "OK" to child #5. Current time: Thu May 27 09:14:54 2004

Child #5 (PID=2881) RECV "OK" (3) from parent (with PPID=2870). Current time: Thu May 27 09:14:54 2004

Child #1 (PID=2877) SEND "2" (4) to parent (with PPID=2870). Current time: Thu May 27 09:14:54 2004

Parent (PID=2870) RECV "2" from child #1. Current time: Thu May 27 09:14:54 2004

Parent (PID=2870) SEND "OK" to child #1. Current time: Thu May 27 09:14:54 2004

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

Parent (PID=2870) SEND "OK" to child #1. Current time: Thu May 27 09:14:58 2004

Child #1 (PID=2877) RECV "OK" (3) from parent (with PPID=2870). Current time: Thu May 27 09:14:58 2004

Child #1 (PID=2877) want to be killed...

Child with PID=2877 is killed (res=4)!!! Current time: Thu May 27 09:14:58 2004

Child #2 (PID=2878) SEND "4" (4) to parent (with PPID=2870). Current time: Thu May 27 09:14:58 2004

Parent (PID=2870) RECV "4" from child #2. Current time: Thu May 27 09:14:58 2004

Parent (PID=2870) SEND "OK" to child #2. Current time: Thu May 27 09:14:58 2004

Child #2 (PID=2878) RECV "OK" (3) from parent (with PPID=2870). Current time: Thu May 27 09:14:58 2004

Child #2 (PID=2878) want to be killed...

Child with PID=2878 is killed (res=4)!!! Current time: Thu May 27 09:14:58 2004

Child #3 (PID=2879) SEND "4" (4) to parent (with PPID=2870). Current time: Thu May 27 09:14:58 2004

Child #4 (PID=2880) SEND "4" (4) to parent (with PPID=2870). Current time: Thu May 27 09:14:58 2004

Parent (PID=2870) RECV "4" from child #3. Current time: Thu May 27 09:14:58 2004

Parent (PID=2870) SEND "OK" to child #3. Current time: Thu May 27 09:14:58 2004

Child #3 (PID=2879) RECV "OK" (3) from parent (with PPID=2870). Current time: Thu May 27 09:14:58 2004

Child #3 (PID=2879) want to be killed...

Child with PID=2879 is killed (res=4)!!! Current time: Thu May 27 09:14:58 2004

Parent (PID=2870) RECV "4" from child #4. Current time: Thu May 27 09:14:58 2004

Parent (PID=2870) SEND "OK" to child #4. Current time: Thu May 27 09:14:58 2004

Child #4 (PID=2880) RECV "OK" (3) from parent (with PPID=2870). Current time: Thu May 27 09:14:58 2004

Child #4 (PID=2880) want to be killed...

Child with PID=2880 is killed (res=4)!!! Current time: Thu May 27 09:14:58 2004

Child #5 (PID=2881) SEND "4" (4) to parent (with PPID=2870). Current time: Thu May 27 09:14:58 2004

Parent (PID=2870) RECV "4" from child #5. Current time: Thu May 27 09:14:58 2004

Parent (PID=2870) SEND "OK" to child #5. Current time: Thu May 27 09:14:58 2004

Child #5 (PID=2881) RECV "OK" (3) from parent (with PPID=2870). Current time: Thu May 27 09:14:58 2004

Child #5 (PID=2881) want to be killed...

Child with PID=2881 is killed (res=4)!!! Current time: Thu May 27 09:14:58 2004

The end of main prog (PID=2870). Current time: Thu May 27 09:14:58 2004

[serge@localhost lab6]$ ps

PID TTY          TIME CMD

2425 pts/0    00:00:00 bash

2882 pts/0    00:00:00 ps

[serge@localhost lab6]$