jarib/childprocess — pull request #35 by schmich (2012-06-28 01:57:08+00:00)
Title: Adding support for setting the child process' working directory.

These changes add support for setting the child process' working directory, e.g.:

````ruby
p = ChildProcess.build('ls')
p.cwd = '/'
p.start
````

Implementing this was pretty straight forward except for the `PosixSpawnProcess` case. In that case, it doesn't look like there's an easy way to define what the child process' working directory should be, so I 1) set the current process' working directory, 2) spawn the child (which inherits pwd), and then 3) restore the current process' working directory. This isn't an issue unless the app is multi-threaded and happens to access the working directory in the small window while it's changed. If you're uncomfortable with this, it would be possible to just not support working directory changes for `PosixSpawnProcess`.

I tested this on Windows, Windows/JRuby, OSX, and Linux. I also added a simple spec to test this new functionality.

Thanks for your work on this project!