add routine of sub process while forking

add routine of sub process while forking