When the CEO of a publicly traded corporation is diagnosed with a serious illness, what is his obligation to inform shareholders? There is no clear answer.

The SEC requires that any public company disclose material information to investors so that they can include it in their calculation of whether to buy or sell a stock. But there are no specific guidelines governing health issues, and the SEC has never taken action against a company in this area. It is generally accepted that a company should disclose the diagnosis of a CEO's fatal illness, while it need not say anything about a problem like a broken arm. Everything in between is problematic - and the tension between privacy and shareholder interests is even greater when the CEO is so powerfully identified with the company's fortunes.

Different companies have handled the problem in different ways. When Intel (INTC, Fortune 500) CEO Andy Grove was diagnosed with prostate cancer in 1995, he made no formal disclosure - Grove chose to write about it instead in a 1996 article for Fortune. On the other hand, Berkshire Hathaway's Warren Buffett - one of the few Fortune 500 CEOs considered as essential to his company as Jobs is to Apple - issued a press release in June 2000 days after he learned he would need surgery to remove benign polyps along with part of his colon, even though the procedure was considered routine.

The story of how Jobs managed his illness has not previously been disclosed. This account comes from several sources with personal knowledge of the situation; all insisted on not being identified.

Jobs' tumor was discovered in October 2003. He had been getting abdominal scans periodically because of a history of intestinal problems. His doctors noticed a growth that turned out to be an islet cell neuroendocrine tumor - a rare and operable form of pancreatic cancer. With surgery, his long-term prognosis would be good.

But Jobs sought instead to treat his tumor with a special diet while launching a lengthy exploration of alternative approaches. "It's safe to say he was hoping to find a solution that would avoid surgery," says one person familiar with the situation. "I don't know if he truly believed that was possible. The odd thing is, for us what seemed like an alternative type of thing, for him is normal. It's not out of the ordinary for Steve."

Apple director Levinson, who has a Ph.D. in biochemistry, monitored the situation for the board. He and another director, Bill Campbell, tried to persuade Jobs to have the surgery. "There was genuine concern on the part of several board members that he may not have been doing the best thing for his health," says one insider. "But Steve is Steve. He can be pretty stubborn."

By the standards of medical science, it was an open-and-shut case: There was no serious alternative to surgery. "Surgery is the only treatment modality that can result in cure," Dr. Jeffrey Norton, chief of surgical oncology at Stanford, wrote in a 2006 medical journal article about this kind of pancreatic cancer. It was Norton, one of the foremost experts in the field, who eventually operated on the Apple CEO, Fortune is told. (He declined to comment.)

Dr. Roderich Schwarz, chairman of surgical oncology at the University of Texas Southwestern Medical Center in Dallas, who has performed the procedure more than 150 times (but who was not involved in Jobs' case), says that waiting more than a few weeks with this diagnosis "makes no sense because you don't know what the potential for growth or spread is." Schwarz says he knows of no evidence that diet can be helpful. "But the patient decides. If they believe an herbal diet can do miracles, they have to make the decision. Every once in a while you have somebody who decides something you wish they wouldn't."

The surgery Jobs faced, known as the "Whipple procedure," is brutal and complex. It lasts six hours or more and involves removing parts of the pancreas, bile duct, and intestines, then reconstructing the digestive tract. But it's relatively safe: Mortality from the surgery is less than 5% at specialized medical centers with surgeons who have performed it many times.

Jobs put the procedure off for more than nine months, raising the thorny issue of disclosure. He told the board, and the board decided to say nothing. Palo Alto attorney Larry Sonsini, the company's longtime outside counsel, advised the directors that the CEO's right to privacy trumped any disclosure requirement as long as he could continue to perform his duties. A second outside lawyer agreed.

So Apple conducted business as usual, disclosing nothing and letting the tiny circle of insiders who knew about the situation continue to trade Apple shares.

The board of Pixar, the other public company where Jobs served as CEO, remained in the dark until his announcement, according to director Graziano. "All I know is I didn't [know]," Graziano told Fortune.

In the end Jobs had the surgery, at the end of July in 2004. Sources tell Fortune that he decided to proceed with the operation earlier that month, after a scan revealed growth in the tumor. By all accounts, the surgery was a success.

It is impossible to know whether Jobs' decision to delay the procedure has increased his risk of a cancer recurrence in any way. In a newspaper interview, Norton estimated that 80% to 90% of patients with Jobs' condition survived at least ten years, while cautioning that predictions are difficult because the number of cases is so small.

Jobs himself has never volunteered much on the matter - except once. In a June 2005 commencement address he gave at Stanford University, which was published in Fortune, he described the sequence of events this way: "About a year ago, I was diagnosed with cancer. I had a scan at 7:30 in the morning, and it clearly showed a tumor on my pancreas.... The doctors told me this was almost certainly a type of cancer that is incurable, and that I should expect to live no longer than three to six months.... Later that evening I had a biopsy where they stuck an endoscope down my throat, through my stomach into my intestines, put a needle into my pancreas and got a few cells from the tumor. I was sedated, but my wife, who was there, told me that when they viewed the cells under a microscope, the doctor started crying, because it turned out to be a very rare form of pancreatic cancer that is curable with surgery. I had the surgery, and, thankfully, I am fine now."

It was a great speech, simple and moving - though it clearly left the false impression that Jobs had learned of his illness in mid-2004 and immediately proceeded to surgery, when in fact he had learned of it in October 2003.

Ralph Whitworth, an activist institutional investor, served as chairman of Waste Management when its CEO was stricken with a fatal brain tumor. He says the issue is "a very tricky one," but Apple should have disclosed Jobs' illness promptly after assessing his situation - whether legally required to or not. "Good governance has nothing to do with following the minimum standards," says Whitworth. "Executives should announce before they're going into major surgery. Yes, your stock will go down. [But] how would the shareholders have felt if they said he died on the operating table? "

Former SEC chairman Levitt agrees. "It's a difficult personal decision," says Levitt. "But clearly if a CEO is going in for major surgery, that's a disclosable item."

In the end, the combination of a happy outcome and remarkable secrecy about just how long Apple had known Jobs was sick minimized any public criticism - or impact on its shares. "Steve came through this okay, and Apple never suffered because of it," says one insider. "Had it come out differently - thank God it didn't - there could have been a lot of people second-guessing Apple had they known what happened."

***

Last year the founder of the Stanford Social Innovation Review called Apple one of "America's Least Philanthropic Companies." Jobs had terminated all of Apple's long-standing corporate philanthropy programs within weeks after returning to Apple in 1997, citing the need to cut costs until profitability rebounded. But the programs have never been restored.

Unlike Bill Gates - the tech world's other towering figure - Jobs has not shown much inclination to hand over the reins of his company to create a different kind of personal legacy. While his wife is deeply involved in an array of charitable projects, Jobs' only serious foray into personal philanthropy was short-lived. In January 1987, after launching Next, he also, without fanfare or public notice, incorporated the Steven P. Jobs Foundation. "He was very interested in food and health issues and vegetarianism," recalls Mark Vermilion, the community affairs executive Jobs hired to run it. Vermilion persuaded Jobs to focus on "social entrepreneurship" instead. But the Jobs foundation never did much of anything, besides hiring famed graphic designer Paul Rand to design its logo. (Explains Vermilion: "He wanted a logo worthy of his expectations.") Jobs shut down the foundation after less than 15 months.

Jobs has never revealed any plans to leave Apple, though after news of his pancreatic cancer was disclosed, the board insisted it had privately discussed a succession plan. It is hard to imagine a tougher act to follow. Indeed, Jobs is a tough act for even Jobs to follow.

Already in 2008, Jobs has unveiled his usual array of sleek new products, highlighted by the MacBook Air, billed as "the world's thinnest notebook." The company's most recent quarterly results were its best ever: Apple reported $1.58 billion in profit, $18 billion in the bank, and zero debt. Despite signs of a recession, the company projected second-quarter earnings growth of 29%.

But this time, all that just wasn't amazing enough. Since the beginning of 2008, Apple shares have tumbled by 40% from their all-time high in late December (in a down market, to be sure). Disappointing the masses is a risk you take when your stock is priced for bedazzlement.

And even for Apple, conjuring the magic won't get any easier. It's hard for a big company to keep growing rapidly, especially if the economy heads into a downturn. Cellphone makers - and even Google (GOOG, Fortune 500) - are cranking out new products to compete with the iPhone. The iPod market shows signs of being saturated. Amazon's (AMZN, Fortune 500) new digital-music store is gunning for iTunes, aided by record companies eager to escape Jobs' insistence on dictating the price for their content. It's the same reason NBC Universal took its shows off iTunes. Then there's the possibility of additional fallout from the SEC and Justice Department investigations at Apple and Pixar.

As usual, Apple's fortunes will rest not just on external factors, but on the shoulders of its CEO, who has pushed his company both to astounding heights and to the edge of significant risk. It is Steve Jobs himself who is the wonder - as well as the worry.

REPORTER ASSOCIATE Doris Burke contributed to this article.