Address zombie process in the replication by using waitpid

Submitted by:	delphij
Ticket:	#6052