fixed deadlock by inheriting IO channels on the external processes