kennethreitz/envoy — pull request #28 by srathbun (2012-05-02 20:53:20+00:00)
Title: Added ability to switch between posix and non posix mode

Some programs, such as ghostscript expect to receive their inputs in posix mode. That is, quotes will be stripped from around tokens, but the whole token is returned. Specifically, this fails for the switches

`-I"c:/program files/gs/gs9.05/fonts"` and `-sOutputFile="this is a test.pdf"`

Since The quotes get passed in with non posix mode, ghostscript is unable to open or locate the specified items. Also, the `-I` switch parses as two items, because non posix mode does not recognize a quote unless it has preceding whitespace.

My original fix centered on adding posix mode due to the double parsing of the input string. With the string only being parsed once, I need posix mode enabled.

The default is appropriate for whatever OS you are on, but is configurable in the run call if necessary.