use wait to sync parent and child process
get child status