mozilla-services/circus — pull request #310 by pthrasher (2012-11-08 16:12:30+00:00)
Title: Allow socket substitution in args

The docs imply that the socket substitution tokens can be used within the args string, however I found this wasn't the case. The socket object was never being passed into dictionary that gets handed to `replace_gnu_args`. As such, the token would remain intact, and the file descripter for the socket would never be passed onto the command.

Example:

```
[watcher:web]
cmd = /usr/local/bin/chaussette
args = --fd $(circus.sockets.web) --backend meinheld project.wsgi.application

[socket:web]
host = localhost
port = 8000
```

The above would end up running:
`/usr/local/bin/chaussette --fd $(circus.sockets.web) --backend meinheld project.wsgi.application`

Instead of:
`/usr/local/bin/chaussette --fd 3 --backend meinheld project.wsgi.application`

This commit corrects that issue.