§ 941. Judgment as to parties having interest in entire property. If a tenant by the curtesy or for life or for years of the entire property, or a person entitled to a contingent or vested remainder or reversion in the entire property, or a creditor, or other person, having a lien or interest which attaches to the entire property, be made a defendant in the action, the final judgment either may award to such a party his entire right and interest, or the proceeds thereof, or where the right or interest is contingent, direct that the proceeds or share thereof be substituted for the property and invested for whoever may eventually be entitled thereto, or may reserve and leave unaffected his right and interest, or any portion thereof.