Food manufacturer Ralcorp has announced that it has signed a deal to buy snack producer Medallian foods.