Is this the pid that of the backgrounded process, or is it (also?!) the pid of the script launched?
i.e. could we wait for up to 30 seconds for the pid to be running, rather than waiting 30 seconds and then checking?

Or is this to check that the process is *still* up?