Closed arnau closed 8 years ago
@concertman a bit of a recap:
Assumptions:
0.0.0.0
, 8080
}).Implementation:
The PID can be obtained via command line: mastermind --pid
with the caveat that you must provide the same {host, port} configuration as the running Mastermind. So, if you run Mastermind on port 8034 you'll have to run mastermind --pid --port 8034
.
If the requested PID is unknown it returns a -1
(The choice is just to return the same type, we can use a different response if it is more useful).
When running in Driver mode, the PID can be obtained via HTTP using the http://proxapp:5000/pid/
. E.g.
curl -XGET --proxy http://localhost:8080 http://proxapp:5000/pid/
I think this is it. Let me know if this covers your expectations for #39. If so, I'll merge the PR.
@arnau this looks good I would say we go ahead with it.
not ready to merge (work on #39)
@concertman this branch creates a file containing the PID of a new mastermind process. When the process terminates it removes the file.
To allow multiple mastermind processes the file name follows the pattern
mastermind.{host}{port}.pid
and it is stored in/var/tmp
.So running mastermind with its defaults
0.0.0.0
and8080
will create a file in/var/tmp/mastermind.00008080.pid
.Thoughts?