I thought I saw in one of them technical schematic books that the cockpit itself separated from the rest of the ship.
Although I've always wanted to write a bit of EU short story with Porkins ejecting and parachuting (somehow) to the Death Star surface. He finds a hatch, gets inside and fights his way to an escape ship, only to be vaporized in the explosion.