connect correct stdin for execute progs