HOW CAN I USE FORK,SLEEP,WAIT AND WRITE IN A PROCESS WITH FATHER AND SON..??

Hi..
I was unable to do a homework-program (gcc code) which refers to the fork,wait,sleep and write..

Homework-program:
A process of father create (fork) a son and will sleep 90 minutes..After this, son process create a grandchild and will sleep 60 minutes..Grandchild process will sleep for 30 minutes..After sleep,each process must write a message about which process is and what is the PID..

Please i want you to help me..thanks for all..
i will wait the answers..
There is a thread in this forum about forking processes:
http://www.cplusplus.com/forum/unices/4568/

Are you sure you want to sleep 90 minutes and not seconds? You will have a lot of waiting to do.
yes you are right..
it will sleep 90 seconds,60 seconds,30 seconds, not minutes..
Topic archived. No new replies allowed.