Commissioners to take depositions appointed by the courts of this State, or by the courts of the states or territories of the United States, arbitrators, referees, and all persons acting under a commission issuing from any court of record in this State, are hereby empowered, they or the clerks of the courts respectively in this State, to which such commission shall be returnable, to issue subpoenas, specifying the time and place for the attendance of witnesses before them, and to administer oaths to said witnesses, to the end that they may give their testimony. And any witness appearing before any of the said persons and refusing to give his testimony on oath touching such matters as he may be lawfully examined unto shall be committed, by warrant of the person before whom he shall so refuse, to the common jail of the county, there to remain until he may be willing to give his evidence; which warrant of commitment shall recite what authority the person has to take the testimony of such witness, and the refusal of the witness to give it.
N.C. Gen. Stat. § 8-78