xup: check for g_shmat failure and change error case