
    [No. 8,777.
    Department One.
    February 23, 1885.]
    ALEXANDER R. WALSH, Respondent, v. SAMUEL SOULE et al., Appellants.
    Undertaking on Appeal—Ejectment—Conveyance Pendente Lite—Trustee op Express Trust.—Where the plaintiff, after the commencement of and before the rendition of judgment in an action of ejectment, conveys the premises in controversy, and thereafter recovers judgment in his own name, which is subsequently affirmed on appeal, an action on an undertaking on appeal given to stay execution, in pursuance of section 945 of the Code of Civil Procedure, to recover the value of the use and occupation of the land from the time of the appeal until the delivery of possession, may be maintained by him in his own name. In such case, the plaintiff sues as trustee of an express trust for the benefit of his grantee.
    Appeal from a judgment of the Superior Court of the city and county of San Francisco.
    Action on an undertaking on appeal, given in an action of ejectment, to stay execution of judgment. The facts are sufficiently stated in the opinion of the court.
    
      Walter Van Dyke, and D. W. Douthitt, for Appellants.
    The action was not brought in the name of the real party in interest. (Code Civil Proc., § 367; Summers v. Farish, 10 Cal. 347; Wiggins v. McDonald, 18 Cal. 126; Western Development Co. v. Emery, 61 Cal. 611.) The party beneficially interested in the damages is the real party in interest, and the one who must prosecute the action. (Summers v. Farish, 10 Cal. 347 ; Browner v. Davis, 15 Cal. 9 ; Prader v. Purkett, 13 Cal. 588 ; Baker v. Bartol, 7 Cal. 549.)
    
      McAllister & Bergin, for Respondent.
    The plaintiff, after the conveyance of his interest, occupied the position of trustee for the benefit of his grantees, and as such could maintain the action. (Walker v. Felt, 54 Cal. 386; Welch v. Mandeville, 1 Wheat. 236; Chapman v. Shattuck, 3 Gilm. 52; Sheridan v. Mayor, 68 N. Y. 31; Allen v. Brown, 44 N. Y. 231; Peck v. Yorks, 75 N. Y. 424; Cummings v. Morris, 25 N. Y. 625 ; Eaton v. Alger, 47 N. Y. 345; Hays v. Hathorn, 74 N. Y. 489; Hays v. Southgate, 10 Hun, 512; Freeman v. Falconer, 44 N. Y., S. C. 135.)
   McKinstry, J.

The judgment in favor of plaintiff in the ejectment suit—Walsh v. Hill et al.—was entered February 25, 1873. The present action is on an undertaking, given on appeal from that judgment, to stay its execution. Amongst other things, the undertaking provides, that “if the judgment appealed from be affirmed, or the appeal be dismissed, they ” (present defendants) “ will pay the value of the use and occupation of the property, from the time of the appeal until the delivery of the possession thereof,” etc. The answer herein avers that long before the entry or rendition of the judgment in ejectment, the plaintiff therein—plaintiff herein—had conveyed all his right, title and interest in the premises demanded to Mason and Bensley. The court found that such conveyance was made after the commencement of, and before the rendition of, judgment in the action Walsh v. Hill et al.

The statutory undertaking is provided for as part of the procedure relating to appeals, and in each case has reference to a particular judgment and its execution. (C. C. P., § 945.) It is made primarily for the benefit of the plaintiff in the judgment to which it refers, and should be treated as if in terms made to him. It is executed to indemnify the plaintiff against damages sustained by the wrongful withholding of the possession of the demanded premises by the defendant in the judgment, pending an appeal, and until the plaintiff shall regain possession. As between the plaintiff and defendant, in the action of ejectment, the judgment in that action conclusively determines that it is the plaintiff from whom the defendant has wrongfully withheld the possession. And the judgment is evidence (at least prima facie) that the plaintiff is the person from whom the defendants continued to withhold the possession pending the appeal, and until, etc. The grantee of a plaintiff in ejectment, pendente lile, acquires no right which can be enforced in the action, or under the judgment, in his own name, unless he shall have had himself substituted as plaintiff. (C. C. P., § 385.) The rights he acquires—so far as they depend upon the action of ejectment, the judgment therein, or its execution—remain to be enforced for his benefit in the name of the plaintiff. If the grantee is substituted, under section 385, he himself becomes the plaintiff. If he is not so substituted, he does not, as grantee of plaintiff’s estate in the land, become the legal assignee of plaintiff, as to an undertaking executed on appeal from a judgment subsequently entered in favor of plaintiff. By omitting to apply to be substituted as plaintiff, he makes the nominal plaintiff his trustee, to prosecute the action and recover the possession in his own name. The grantee of plaintiff cannot apply in his own name for a writ of restitution, or to be placed in possession under a judgment in favor of his grantor, unless he has been substituted as plaintiff. The judgment, in ejectment has adjudged the plaintiff therein to be entitled to the possession of the demanded premises, and the claim here sought to be enforced is based on a contract which relates to that judgment, and to the delivery of the possession to the party in whose favor the judgment was rendered. There is no pretense of an assignment of the undértaking after it was made.

With certain exceptions, every action must be prosecuted in the name of the real party in interest. (C. C. P., § 367.) But here the undertaking was in legal effect given to the party plaintiff in the ejectment, to whom, as the court below finds, was delivered the possession of the demanded premises. If the grantees of the plaintiff, of a date prior to the judgment, acquired any interest in the value of the use and occupation of the defendant in the ejectment, it was one to be enforced against or in the name of their grantor. As to the undertaking, it is to pay plaintiff the value of the use and occupation. In legal effect the contract is made with him, and if others have claims on him with respect to it, he should be held as to them to be a trustee of an express trust, authorized to sue on the undertaking. (C. C. P., § 369.)

Judgment affirmed.

Ross, J., and McKee, J., concurred.

Hearing in Bank denied.  