This is a bad design. You shouldn't be poisoning the application's process. Spawn and friends allow you to provide an alternate environment.