using __popen segfaults, switch back to popen