rework the Subprocess::communicate() API