subprocess redirect stdout to self