Whenever it appears, from the return of the writ, or otherwise, that the party is detained on any process under which any other person has an interest in continuing his or her imprisonment or restraint, the party shall not be discharged until sufficient notice shall have been given to the interested person or his or her attorney, if within the state or within thirty (30) miles of the place of examination, to appear and object to the discharge, if he or she think fit, which notice shall be given by the party imprisoned, in the manner prescribed by the court, or, in default thereof, he or she shall be remanded to the custody of the person against whom the writ of habeas corpus issued.
R.I. Gen. Laws § 10-9-15