Any officer or person to whom the warrant mentioned in section 2A:67-8 of this title shall be directed shall execute the same by bringing the prisoner named therein, and the person who detains him, if so commanded by the warrant, before the court or judge issuing the same.
Thereupon the person detaining such prisoner shall make a return in like manner and the like proceedings shall be had as if a writ of habeas corpus had been issued in the first instance.
N.J.S. § 2A:67-9