Ping was broken. It always exited with an wrong status. It sometimes waited for a timeout due to a race condition. Both problems are solved by this patch.