at Her Majesty's pleasure
For an indeterminate length of time, as of one who is being held in prison. Primarily heard in UK. If you break the law while you're in London, they can keep you in prison at Her Majesty's pleasure, you know.
at Her (or His) Majesty's pleasure
detained in a British prison.