fix an obscure issue: parent process should not use while loop.