Section 5. The court may set off to the petitioner his share, leaving the residue of the land for the persons entitled thereto, subject to a future partition; or it may set off to the persons entitled to the residue their respective shares therein. If two or more co-tenants consent to hold their shares undivided, such shares may be so set off.