popen doesn't make it simple to change the working directory for a process

popen doesn't make it simple to change the working directory for a process

To set the working directory you have to resort to tricks like:

cd ../path/to/working/dir && cat blah.txt

Which puts you in shell scripting guru territory which isn’t a good thing.