popen3 with ENV control