Chain of command?


a) Write a C-program that creates a chain of 10 processes and prints out their process ids and relationships. For example, process 1 is the parent of process 2, process 2 is the parent of process 3, process 3 is the parent of 4 and so on. Each child has to print out all her ancestors identified by the process ids.

b) Write a C-program that creates a fan of 10 processes. That is, process 1 is the parent of prcocesses 2, 3, 4, 5, 6 and so on.

I'm assuming that he means c++ since that's what we've been using. Can someone point me in the right direction about how to start this and what it means? Or where I can learn how to do this.
Alright it's starting to make a little more sense. So it's used to run multiple processes at the same time then?

I'm still unsure about how to even begin this but I'm hoping to get a better explanation in class today.
Somehow I doubt it but thanks ne555.
Topic archived. No new replies allowed.