ptrace in production systems

ptrace in production systems

Oron Peled oron at actcom.co.il
Mon Feb 2 23:47:37 IST 2009


On Sunday, 1 בFebruary 2009, Shachar Shemesh wrote:
> Oron Peled wrote:
> > On Sunday, 1 בFebruary 2009, Shachar Shemesh wrote:
> >   
> >> Then again, it is a daemon. It has no parent (well, init is its parent).
> >>     
> >
> > It's not clear from your description (or your replies to other posters)
> > why you don't want init to babysit this daemon.
> Because I do not want it under a watchdog. This is not what this is about.

OK,

> Under certain circumstances I need to get the agent to reload its 
> configuration. When that happens, and only then, I need to *shut it 
> down* and then restart it. I do NOT want a watchdog to automatically 
> restart it whenever it fails. Such a thing will actually be a hindrance.

Why not have it restart itself?
	execve(argv[0], argv, yada, yada)
from some signal handler? Than the "controlling" daemon would send it
(e.g: sighup) when it want this to happen and the agent would restart itself.

Unless you have other (unstated) requirements.

-- 
Oron Peled                                 Voice: +972-4-8228492
oron at actcom.co.il                  http://www.actcom.co.il/~oron
Hi! I'm a .signature virus! Copy me into your ~/.signature to help
me spread!




More information about the Linux-il mailing list