Accept custom IO in popen* methods