working subprocess in pipe