10 void announce_death() {
12 printf("i'm pid #%lu and i died.\n", (long) getpid());
15 int main(int argc
, char *argv
[]) {
20 for(int i
= 0; i
< 5; i
++) {
21 if((children
[i
] = fork()) == 0)
27 for(int i
= 0; i
< 5; i
++) {
29 kill(children
[i
], SIGTERM
);
36 printf("i'm pid #%lu!\n", (long)getpid());
37 atexit(announce_death
);