if ( !$? ){ # do the stuff you do after a forked process completes sucessfully }