(Reuters) - Toshiba Corp 6502.T has agreed to give Western Digital Corp WDC.O two weeks' notice before closing any sale of a memory chip unit that would involve transferring joint venture shares that Western Digital claims give it a say in the $18 billion sale of the unit.

FILE PHOTO: The logo of Toshiba Corp is seen as window cleaners work on the company's headquarters in Tokyo, Japan, February 14, 2017. REUTERS/Toru Hanai/File Photo

San Francisco Superior Court Judge Harold Kahn on Friday approved an agreement between the two.

Notice from Toshiba to Western Digital will give Western Digital the opportunity to come back to the court or an arbitration panel to argue for a chance to stop the deal. The agreement also puts off a final decision on the question of whether the California court has jurisdiction over Toshiba, one of Japan’s largest companies.

Toshiba is scrambling to sell its flash memory unit to cover losses from its nuclear reactor business. The company is inching toward deals to cap its liabilities from the nuclear unit.

In late June, Toshiba announced its preferred bidder was a group made up of Bain Capital, South Korean chip maker SK Hynix 000660.KS and Japanese-government backed banks that offered $18 billion.But that deal has not come together, so Toshiba's board met last week to consider other bidders.

Western Digital, which is among those being considered, sued Toshiba in San Francisco County Superior Court in mid-June, saying it believed a joint venture with Toshiba means Toshiba needs its consent to sell the flash business.

Western Digital’s joint venture with Toshiba helps finance equipment at Toshiba’s plants in exchange for some of their output.

Western Digital filed its lawsuit in San Francisco to prevent Toshiba from closing the sale of its memory unit before an arbitration panel has a chance to play out.

The deal reached on Friday requires Toshiba to announce within a day the signing of any agreement that would result in the sale of the joint venture and give notice before the close. It stays in effect until 60 days after arbitration has begun.

“As a practical matter, we don’t expect to close a deal during the period addressed in the order,” Yasuo Naruke, senior executive vice president of Toshiba, said in a statement. “We look forward to successfully presenting Toshiba’s position to the (arbitration) tribunal, which we believe will be formed within the next month or so.”

“Our ongoing discussions with Toshiba and its stakeholders have been constructive, and we will continue to work to seek a solution that is in the best interests of all parties,” Western Digital said in a statement.