Ralcorp has agreed to pay $170.8 million in cash for all the stock in the company. In January 2007, Ralcorp will purchase the real estate associated with the business.