It's a little difficult to be specific in this instance. Basically, what I'm looking at is California Code of Civil Procedure section 377.35 which states that "this article applies ot the commencement of an action or proceeding the decedent was entitled to commence." If the shareholder's agreement not to sue the board of directors would serve as a defense in case the shareholder attempted to file a claim against the board of directors, would it also serve as a defense against the heirs if the shareholder dies since the decedent would not have been entitled to proceed with the action?
It really is too hard to answer online. You should get a good answer with about an hour or two of review and research from an attorney. (Just finding the code doesn't meaning checking the court judgments that interpret the code, or other code sections which could modify.)