Near-threshold pion production with radioactive beams