If the principal shall be so surrendered by his or her bail to the court in which the original action is pending, he or she shall be by such court committed to a correctional institution, and there remain to be taken in execution or to be discharged in the same manner as though committed for want of bail in the first instance, and he or she shall remain in the institution in like manner if committed by his or her bail before final judgment be rendered in the action.
R.I. Gen. Laws § 10-11-9