Any two magistrates shall grant the writ of habeas corpus as fully, effectually and lawfully as may any judge of the court of common pleas and general sessions or justice of the Supreme Court of this State, except in cases of felony the punishment for which is death or imprisonment for life and except in changing the custody of any child, in which cases magistrates shall have no jurisdiction in applications for habeas corpus.
S.C. Code § 17-17-40