circus-tent / circus

A Process & Socket Manager built with zmq
http://circus.readthedocs.org/
Other
1.54k stars 258 forks source link

Saving the PID of a watched process to a file while it is running #662

Open paparomeo opened 10 years ago

paparomeo commented 10 years ago

I apologize in advance for creating this issue, but I tried posting in the circus-dev Yahoo! group and got no answer. Also I couldn't find anything like this in the documentation.

I would like to save PID of a process managed by a watcher to a file while the process is running (something like the a pidfile key from the [circus] section of the configuration file but in a [watcher] section), so external processes can interact with it. What would be the best way to achieve this?

Thanks.

Lothiraldan commented 10 years ago

How many process you want for the watcher? With only one process, it should be easy. With more than on process, it will require a little more work.

Why do you want to do that? If you want to communicate with the process, maybe you should look about another IPC methods like message queue or named sockets.