A judge has approved Hostess' shutdown plan, including giving its top executives bonuses totaling up to $1.8 million as part of its wind-down plans, CNBC reports.

The maker of Twinkies, Ding Dongs and Ho Hos told the court the incentive pay is needed to retain the 19 corporate officers and "high-level managers" during the liquidation process, which could take about a year. Two of those executives would be eligible for additional rewards depending on how efficiently they carry out the liquidation. The bonuses would be in addition to their regular pay.

The bonuses do not include pay for CEO Gregory Rayburn, who was brought on as a restructuring expert earlier this year. Rayburn is being paid $125,000 a month.

Hostess is also seeking final approval for its wind-down, which was approved on an interim basis last week.

The bakers union, Hostess' second-largest union, is asking the judge to appoint an independent trustee to oversee the liquidation, saying that the current management "has been woefully unsuccessful in its reorganization attempts."

The process includes the quick sale of its brands, which also include CupCakes, Donettes and Wonder Bread. Hostess says it has received a flood of interest in the brands, including from national packaged food makers, international companies and its own customers, which include supermarkets and big-box retailers. Hostess sales have been declining over the years, but still come in at between $2.3 billion and $2.4 billion a year, a banker for the company said in court last week.

The company's shuttering means loss of about 18,000 jobs.

In court Thursday, an attorney for Hostess noted that the company is no longer able to pay retiree benefits, which come to about $1.1 million a month. Hostess stopped contributing to its union pension plans more than a year ago.

The company's demise came after years of management turmoil, with workers saying the company failed to invest in updating its products. In January, Hostess filed for its second Chapter 11 bankruptcy in less than a decade, citing steep costs associated with its unionized work force.

Although Hostess was able to reach a new contract agreement with its largest union, the Teamsters, the bakers union rejected the terms and went on strike Nov. 9. A week later, Hostess announced its plans to liquidate, saying the strike crippled its ability to maintain normal production.