fix bug of log pid being parent pid