Native shutdown function handling