narrow the race condition of pchild process leaking