
58 Cal.App.2d 11 (1943)
NATIONAL AUTOMOBILE INSURANCE COMPANY (a Corporation), Appellant,
v.
R. E. WINTER et al., Respondents.
Civ. No. 6828. 
California Court of Appeals. Third Dist.  
Apr. 7, 1943.
 John J. Taheny for Appellant.
 Earl Warren, Attorney General, Ralph H. Cowing, Deputy Attorney General, Robert W. Scott and Downey, Brand & Seymour for Respondents.
 ADAMS, P. J.
 Appeal from a judgment entered in favor of defendants upon plaintiff's failure to amend its complaint after demurrers thereto had been sustained.
 The allegations of plaintiff's complaint, briefly stated, are that on or about December 31, 1938, one Dow L. Bonnell, a milk distributor, as principal, and plaintiff, as surety, executed a bond to the State of California, in favor of every producer of milk or cream purchased by said principal, conditioned for the payment by said principal of all amounts due to such producers for purchases from them by said principal for the year 1939, pursuant to the terms of division IV, chapter 10, of the Agricultural Code of California; that at all times mentioned in the complaint one V. J. Hostetter and the defendant Winter were producers and producer-creditors as defined in section 735.3(e) and section 737.5(b) of the Agricultural Code; that as an inducement for the issuance of *14 said bond, and in consideration of the issuance of same by plaintiff, defendant Winter executed and delivered to plaintiff, at the time that Bonnell made application for said bond, an indemnity agreement in writing, wherein he agreed to indemnify plaintiff against any loss plaintiff might sustain by reason of its executing same, and that in consideration of the premium, and of the indemnity agreement of Winter, plaintiff executed said bond; that while said bond was in effect Bonnell purchased milk and cream from Winter and Hostetter and failed to pay for same; that on July 25, 1939, the Director of Agriculture brought suit against Bonnell and plaintiff for the purpose of recovering on said bond, and recovered a judgment against plaintiff in the sum of $2,000 and costs, which sum plaintiff paid to said Director of Agriculture; that plaintiff had made demand upon defendant Winter for performance of his agreement of indemnity but that Winter had refused and failed to comply; that the Director of Agriculture was in possession of the said $2,000 and proposed to pay same, pro rata, to Hostetter and Winter; that Winter was insolvent and that if his share were paid to him by the Director the indemnity agreement would be defeated and plaintiff would be unable to recover thereon. It prayed that the indemnity contract be enforced, that the Director of Agriculture be enjoined from distributing to defendant Winter any share of the proceeds recovered upon said bond, that plaintiff be subrogated to all right and interest of defendant Winter in and to said funds, that the Director be ordered to pay to plaintiff, as subrogee of Winter, his pro rata share of the moneys recovered on said bond, and that it recover from Winter such additional amount as might be necessary to indemnify it for its loss sustained by virtue of its bond and the failure of Winter to comply with his agreement of indemnification.
 To this complaint both defendants demurred on the ground that the complaint did not state facts sufficient to constitute a cause of action, and that another action was pending between the same parties for the same cause. At the same time defendants filed answers to said complaint, in which they set up, as a special defense, the institution of an action on the bond by the Director of Agriculture, alleging that in that action defendant (plaintiff herein) had set up in its answer, as a special defense, that Winter had, on or about October 31, 1938, entered into an indemnity agreement wherein he *15 (Winter), in consideration of defendant's executing the Bonnell bond, joined in said indemnity agreement and as such became an indemnitor of said bond; that the trial court had found "that the allegations of the further separate and distinct defense in the answer of defendant National Automobile Insurance Company, are untrue, except that it is true that said R. E. Winter did execute the endorsement appearing on defendants' Exhibit 'A' in evidence, reading as follows, to wit: 'In consideration of the National Automobile Insurance Company executing the bond hereinabove applied for, I hereby join in the foregoing indemnity agreement. R. E. Winter (Sgd)'"; and that the judgment in said action was a judgment on the merits "including the merits of the said separate and distinct defense of the said National Automobile Insurance Company"; and that the said judgment is a full and complete bar to the cause of action attempted to be stated in the complaint herein.
 The only question presented by this appeal is whether the trial court erred in sustaining defendants' demurrers. The grounds urged by defendants before the trial court in support of their demurrers were that the judgment in the action brought by the Director of Agriculture against plaintiff operates as an "estoppel," and that said complaint shows upon its face that the contract which plaintiff seeks to enforce is against public policy in view of the provisions of sections 735(a), 735.1(d) and 737.5 of the Agricultural Code. The same grounds are urged here in support of the judgment from which the appeal is taken.
 [1a] Respondents apparently confuse the pleas of estoppel and res judicata with the pendency of another action as ground for demurrer to a complaint. Under section 430 of the Code of Civil Procedure the pendency of another action between the same parties for the same cause is made ground for demurrer; but to make it available it must appear upon the face of the complaint that said action is actually pending and that it involves the same parties and the same cause. This the complaint in the present action does not disclose. It merely alleges that the Director of Agriculture brought an action against the surety and obtained a judgment therein for the penalty of the bond plus costs. It does not appear from the complaint that Winter was a party to that action or that the question here sought to be litigated, to wit, plaintiff's *16 right to recover from Winter on the latter's contract of indemnity, was an issue in that case. But it does appear that that action was no longer "pending," as it is alleged in the complaint that defendant (plaintiff herein) had paid the judgment.
 [2a] "Another action pending," as ground for demurrer, does not include an action which has been fully adjudicated. [3] The plea of another action pending is dilatory in its nature and is not favored. [4] The rule that the pendency of one action abates another is based in part upon the practical supposition that the first suit is effective and affords an ample remedy to the party and that the second is unnecessary and vexatious, and in part upon the legal principle that the law abhors a multiplicity of actions. (1 Cal.Jur. 23.) [2b] The plea is ineffectual unless the former suit is actually pending at the time the later suit is commenced. Section 1049 of the Code of Civil Procedure provides that an action is deemed to be pending from the time of its commencement until its final determination upon appeal, or until the time for appeal has passed, unless the judgment is sooner satisfied. After the judgment has become final, demurrer on the ground of another action pending is untenable, and the objection must be based on a plea in bar of res judicata. (1 Cal.Jur. 26. Also, see, Crowhurst v. Green, 99 Cal.App. 58, 59 [277 P. 886]; Buhman v. Nickels & Brown Bros., 7 Cal.App. 592 [95 P. 177]; Hilton v. Reed, 46 Cal.App.2d 449, 454 [116 P.2d 98]; 118 A.L.R. 1477.) [5] Another requisite for the plea of another action pending is that the causes of action and the issues in the two suits be substantially the same; and it must also appear that it is between the same parties as the later action and that these parties stand in the same relative position as plaintiff and defendant. (1 Cal.Jur. 32.) [1b] The plea of another action pending is not raised by demurrer unless the complaint shows affirmatively that the prior action possesses such characteristics as to make the plea available.
 [6] Respondents argue that in determining the sufficiency of the complaint this court should consider the answers of defendants, and their affidavits filed in the trial court in connection with application therein for a temporary restraining order. A demurrer reaches only matters appearing upon the face of the pleading to which it is directed, and it must be determined upon the allegations of such pleading. (21 Cal.Jur. 94.) Matters of defense not apparent in the pleading are *17 not available upon demurrer. (21 Cal.Jur. 116.) On the hearing of a demurrer, therefore, the court is bound by the facts as alleged in the pleading attacked by the demurrer, and it is not entitled to consider facts presented to it through the medium of an affidavit. (Mackay v. Clark Rig Bldg. Co., 5 Cal.App.2d 44 [42 P.2d 341].)
 [1c] The complaint herein not only alleges that the judgment in the former action has been satisfied, but shows also that the parties to the two actions are not the same, as Winter was not a party to the former one. And if we were to consider the answers of defendants and their affidavits filed in the trial court, we would be constrained to note that in their answers they plead the judgment in the prior action as a bar to this one and as res judicata; and as a judgment must be final in order to be available as such bar, it cannot be said that such former action was, at the same time, a pending action justifying the pleading of the pendency thereof as grounds of demurrer.
 We conclude that the complaint herein is not subject to demurrer on that ground.
 [7] As to the remaining question, whether the complaint fails to state a cause of action because it alleges that the indemnification agreement sought to be enforced was given by a milk producer, respondents contend that such an agreement is invalid for the reason that public policy forbids such contracts, the complaint does not allege that Winter, at the time he entered into said contract, was a creditor of Bonnell, the principal on plaintiff's bond, or that plaintiff knew that Winter was, or intended to become, such creditor. It does allege that thereafter Bonnell purchased milk from Winter and refused to pay for same. Obviously when Winter sold to Bonnell he knew that he had agreed to indemnify plaintiff if Bonnell failed to make payment. If, then, it is to be held that this complaint fails to state a cause of action, it must be held that no producer may become the indemnitor on a surety bond given by any distributor; that it is contrary to public policy to permit such an agreement even though the indemnitor at the time he executes same may not be and may not intend to be a creditor of the distributor-principal on said bond; and that when such producer does become an indemnitor, if he is or afterwards becomes a creditor of the distributor he may avail himself of the benefits of the bond, but refuse to *18 perform his indemnity agreement; that he cannot waive the provisions of the Agricultural Code in so far as same are for his benefit because to do so would contravene public policy and in some way affect the purpose of the statute to assure the public an adequate supply of milk.
 There is nothing in the Agricultural Code prohibiting a milk producer from agreeing to indemnify a surety on a distributor's bond; there is nothing inherently corrupt, unlawful or fraudulent in such contract; and we can see nothing inherently inimical to the interests of society in such an agreement. Conceding that the milk industry is one affected with a public interest so as to be subject to regulation (Jersey Maid Milk etc. Co. v. Brock, 13 Cal.2d 620 [91 P.2d 577]); that the purpose of requiring a distributor to furnish a bond to secure payment to the producers from whom he purchases is proper as incidental to the broader purpose to protect the public milk supply by assuring producers of payment for the milk produced and sold by them, and that economic security to producers will tend to encourage compliance on their part with sanitary regulations and the maintenance of dairy herds sufficient to provide an adequate milk supply at reasonable prices to consumers (In re Willing, 12 Cal.2d 591 [86 P.2d 663]), it does not necessarily follow that public policy forbids any producer from agreeing to indemnify any surety for any distributor, regardless of whether the relationship of debtor and creditor may exist between such producer and such distributor.
 [8] Insofar as the Agricultural Code sections, supra, are intended for the personal benefit of a producer, such benefit may be waived by him unless public policy forbids such waiver; and if at the time he becomes indemnitor he knows he is a creditor of the principal on the distributor's bond, or if he thereafter becomes such creditor, he should be held to have waived such benefits.
 In Cox v. Hughes, 10 Cal.App. 553 [102 P. 956], where it was contended that an answer alleging a contract to assign future wages was void as against public policy, and a demurrer thereto was sustained for that reason, the court said, p. 563:
 "A person has the same right to assign his wages as he has to mortgage his homestead or to mortgage personal property that is exempt from execution. If he does not choose to avail *19 himself of the liberal exemption which the statute provides, the courts cannot interfere in his behalf."
 "It is universally held, as stated by Greenhood on Public Policy, that: 'The power of the courts to declare a contract void for being in contravention of sound public policy is a very delicate and undefined power and like the power to declare a statute unconstitutional, should be exercised only in cases free from doubt.'"
 "Before a court should declare a contract not malum in se opposed to sound public policy, it must be entirely satisfied that the public will be substantially benefited and that such advantage is not merely theoretical or problematical."
 In Gamble v. City of Sacramento, 43 Cal.App.2d 200, [110 P.2d 530], an agreement of police officers to donate a designated number of days of service without pay and authorizing the city to make up its payroll accordingly, made in order to avoid a reduction in personnel of the force which would otherwise be necessitated by reduced revenues, was held not contrary to public policy.
 In Bloom v. Hazzard, 104 Cal. 310 [37 P. 1037], where a constable agreed to levy an execution at a rate less than that allowed by statute, charging the full charges in his return, and, after recovering the amount agreed to be charged, sought to recover the full legal fees, contending his agreement was against public policy, the court said, p. 312:
 "We fail to see any valid ground on which this claim can be sustained. The agreement was not intended to work any fraud or wrong upon any party; and so far as appears it cannot be classed as malum in se or malum prohibitum. It may be that the property to be levied on and sold was not worth enough to pay the judgment and the constable's legal fees for making the levy and sale; and, if so, there was no violation of public policy in his agreeing to take less than his legal fees."
 In Keybers v. McComber, 67 Cal. 395, 400 [7 P. 838], the court held that exemption of property from execution is a personal privilege which a debtor may waive. To same effect see Borland v. O'Neal, 22 Cal. 504, 506-507; Stanton v. French, 83 Cal. 194 [23 P. 355]. Also see Huntsman v. State Harbor Commissioners, 17 Cal.App.2d 749 [62 P. 2d 771].
 In McCowen v. Pew 153 Cal. 735 [96 P. 893, 15 Ann.Cas. 630, 21 L.R.A. N.S. 800], where the sufficiency of a cross-complaint *20 to state a cause of action was in question and the validity of a contract therein alleged was challenged as contrary to public policy, the court said, p. 751:
 "The error of the trial court was in holding as it necessarily did, that per se this contract was void as against such policy. A contract should not be declared in contravention of public policy unless it is apparent that it contravenes some public statute, or is against good morals, or that its tendency is to interfere with the public welfare or safety. Nothing of this character appears from the allegations of the cross-complaint."
 Also, page 752:
 "The trial court based its conclusion that the contract for the option was invalid from the allegations of the cross-complaint, which does not pretend to disclose anywhere that any public convenience or necessity was subverted by the contract. The court held, as a matter of law, that a contract giving an option to purchase certain lands as an inducement to the building of a line of railroad between certain points was void upon its face--or void per se. The courts, however, as we have seen, declare expressly to the contrary, and that such a contract, in the absence of any showing that public interest has suffered in its making, is valid and enforceable."
 And we find in Andrews v. Horton, 8 Cal.App.2d 40, 45-46 [47 P.2d 496]:
 " 'Public policy', it has been said, is a term of vague and uncertain meaning, and few cases can arise in which its application may not be disputed. (Spence v. Harvey, 22 Cal. 336 [83 Am.Dec. 69]; Wells, Fargo & Co. v. Enright, 127 Cal. 669 [60 P. 439, 49 L.R.A. 647].) 'The power of the courts to declare a contract void for being in contravention of sound public policy is a very delicate and undefined power, and, like the power to declare a statute unconstitutional, should be exercised only in cases free from doubt.' (Stephens v. Southern Pacific Co., 109 Cal. 86 [41 P. 783, 50 Am.St.Rep. 17, 29 L.R.A. 751].)"
 In Twin City Pipe Line Co. v. Harding Glass Co., 283 U.S. 353 [51 S.Ct. 476, 75 L.Ed. 1112], it was contended that a contract wherein the glass company agreed to take all its requirements of gas from plaintiff so long as the latter could adequately supply them, and to pay rates fixed by public authority, was in contravention of public policy as tending to *21 establish a monopoly contrary to the laws of the state. But the Supreme Court said that competent persons ordinarily have the utmost liberty of contracting, and their agreements voluntarily and fairly made will be held valid and enforced in the courts; that the meaning of the phrase "public policy" is vague and variable, that courts have not defined it and that there is no fixed rule by which to determine what contracts are repugnant to it; that the principle that contracts in contravention of public policy are not enforceable should be applied with caution and only in cases plainly within the reasons on which that doctrine rests; and that it is only because of the dominant public interest that one who has had the benefit of performance by the other party will be permitted to avoid his own promise. It commented that the contract under consideration by it was not arbitrarily or unfairly imposed upon the glass company, but left it free to obtain its supply elsewhere unless the pipe line company's service was adequate; and it said of said contract that "It may not be held invalid in the absence of a clear showing that some definite public detriment will probably result from its performance."
 In Smith v. San Francisco & N. P. Ry. Co., 115 Cal. 584, 600 [47 P. 582, 56 Am.St.Rep. 119, 35 L.R.A. 309], the court said:
 "'Public policy' is a term of vague and uncertain meaning, which it pertains to the law-making power to define, and courts are apt to encroach upon the domain of that branch of the government if they characterize a transaction as invalid because it is contrary to public policy, unless the transaction contravenes some positive statute or some well-established rule of law. Sir George Jessel, as Master of the Rolls, said in Besant v. Wood, L. R. 12 Ch. Div. 605, that public policy is 'to a great extent a matter of individual opinion, because what one man or one judge might think against public policy, another might think altogether excellent public policy'; and in another case (Printing etc. Co. v. Sampson, L. R. 19 Eq. 465), the same jurist said: 'If there is one thing which more than another public policy requires, it is that men of full age and competent understanding shall have the utmost liberty of contracting, and that their contracts when entered into freely and voluntarily, shall be held sacred, and shall be enforced by courts of justice.'"
 In Stephens v. Southern Pacific Co., 109 Cal. 86 [41 P. 783, *22 50 Am.St.Rep. 17, 29 L.R.A. 751], plaintiff leased land from defendant, one of the covenants of the lease being that the lessor should not be liable for any damage caused by fire whether caused by its engines or other means. Stephens' warehouse was burned because of a fire kindled by defendant's employees, on adjoining land, and Stephens and his insurance carrier brought this action, contending that the aforesaid covenant in the lease was void as against public policy. The court said, page 89:
 "This provision of the contract is declared by respondents to be opposed to public policy in this, that it has a tendency to lessen the amount of care that defendant would exercise, both in the selection and operation of its machinery, and in the general conduct of its business, through its employees, in respect to the control of fire, the element here involved; that the undoubted effect of a contract exempting a party from damages flowing from his negligent use of fire is to increase the chances of conflagration; that is, one who is protected by an agreement against the results of his carelessness in this respect will not take the same care as he otherwise would; and, therefore, carelessness occasioned and caused by the agreement, increasing the probabilities of conflagrations, injuriously operates upon the interests of the public at large."
 "The foregoing line of reasoning is ingenious, but we cannot indorse it as sound in law. It has been well said that public policy is an unruly horse, astride of which you are carried into unknown and uncertain paths, and here that horse would be carrying us beyond all limits ever reached before, if respondent's position should meet with our approval. While contracts opposed to morality or law should not be allowed to show themselves in courts of justice, yet public policy requires and encourages the making of contracts by competent parties upon all valid and lawful considerations, and courts so recognizing have allowed parties the widest latitude in this regard; and, unless it is entirely plain that a contract is violative of sound public policy, a court will never so declare."
 Also see Maryland Casualty Co. v. Fidelity etc. Co., 71 Cal.App. 492, 496-499 [236 P. 210].
 It is asserted in the brief of respondent Director of Agriculture that "Though it is not alleged in the complaint, it is obvious that the purpose of the plaintiff surety company was to protect itself from loss on the distributor's bond by having *23 a producer, to whom the distributor might default in payments for milk purchased, agree to indemnify it;" that the producer signs such a bond because of the "competition by producers to secure a market for milk;" that the producer "is subject to pressure from distributors, particularly the distributor who takes his milk," and that if his distributor wants him to go on the indemnity contract so that such distributor can secure his license and handle the producer's milk, the producer is in no position to refuse the demand.
 The language of the opinion last above quoted may well be applied here, and we are unable to say that upon the face of the complaint in this action it is so entirely plain that the alleged indemnity contract of defendant Winter is violative of sound public policy so as to compel the conclusion that said complaint does not state a cause of action.
 Whether the judgment in the prior action constitutes a bar to the present action we do not decide. That question can be determined on a trial of the cause on its merits in the light of the principles herein set forth.
 The judgment is reversed.
 Peek, J., and Thompson, J., concurred.
