We check if ssh is still alive by using WaitForSingleObject(). However, we don't properly check for errors here, assuming that anything except WAIT_TIMEOUT means it has terminated. It is unlikely that WaitForSingleObject() ever returns an error, but it can apparently happen, as we've got a user report with this.