(1) Generally habeas lies when immediate release from confinement is at issue. The privilege of the writ of habeas corpus shall not be suspended, unless when in Cases of Rebellion or Invasion the public Safety may require it.The vehicle for questioning the legality of your incarceration is known as a writ of habeas corpus. The process of pursuing this option is complicated. Release, he or she may revoke your release or impose a prison term sanction or other appropriate, less restrictive sanction. A writ of habeas corpus is used to bring a prisoner or other detainee (e.g. In United States law, habeas corpus is a recourse challenging the reasons or conditions of a person's confinement under color of law. The Privilege of the Writ of Habeas Corpus shall not be suspended, unless when in Cases of Rebellion or Invasion the public Safety may require it. To the extent that he is arguing that the restraining orders place him in custody, the petition is not wellfounded. An injunction can be granted only when an action is pending.