If any sheriff, or his deputy, shall permit any prisoner committed to his custody on mesne or final process in any civil action to go or be without the prison walls without lawful authority or if any sheriff or his deputy suffer such prisoner to go or be at large out of the rules of the prison (except by some writ of habeas corpus, or rule of court), any such going and being out of the prison walls or prison rules, as the case may be, shall be adjudged and deemed an escape. If any sheriff, or his deputy, shall, after one day's notice in writing given for that purpose, refuse to show any prisoner committed to his charge to the plaintiff at whose suit such prisoner was committed or to his attorney, such refusal shall be adjudged to be an escape. But the sheriff shall discharge a defendant in custody on mesne process in a civil case when the plaintiff is nonsuited.
S.C. Code § 23-17-60