exarkun@boson:~$ cat foo.tac
from twisted.application.service import Application, IProcess
application = Application("Demonstrate twistd process name support")
IProcess(application).processName = "name-demo"
exarkun@boson:~$ twistd -y foo.tac
exarkun@boson:~$ pidof name-demo
11097
exarkun@boson:~$
Can this be set at any moment during runtime too ( I suppose so)?
ReplyDeleteCan one set full proctitle (so it doesn't have the nasty looking arguments to it?)
On some platforms that's possible, but twistd doesn't support this now, since it's a bit more complex than setting it up front. Adding support for that when proctitle (and a wrapper) are available might be a good idea, though.
ReplyDeleteis it possible to hide the arguments too? (still shown: "foobar /usr/bin/twistd --originalname -y foobar.tac") anyway, thank you very much for this.
ReplyDeletebrubelsabs