ddollar/foreman — pull request #125 by brainopia (2012-01-07 11:43:12+00:00)
Title: Support for complex cmds in Procfile

If Procfile contains commands with pipes, redirects or shell functions then they won't work correctly.

Example, `bin/runner "cat ~/.skyperc | skype --pipelogin"` will be interpreted by `exec` as `+ cat '~/.skyperc' '|' skype --pipelogin`.

Notice, that pipe gets escaped when we feed it to exec. As a result it outputs `cat: unrecognized option '--pipelogin'`.

Another example if cmd contains `eval` which is a shell function, `exec` wont work with that either - `exec: 2: eval: not found`. And there are a lot of useful functions.

The solution is simple. Use `eval`. It supports the most complex cmds and will run in the current shell instead of subshelling just like `exec` does.