Hi David, see my comments inline. David Powell wrote: > As Mike pointed out, you can definitely accomplish this by putting > those other processes in another contract. Before I'd recommend > that, though, I'd like to understand what the relationship between > these processes are. > > What is killing the master process? How is it being killed? It could be killed with SIGTERM (correct termination) or SIGKILL. In both cases I'd like to restart it to continue providing service. > > It is this happening in an error situation? Currently without SMF, when daemon exists or dies it's not automatically restarted. Subprocesses continue to run, which is desired. > > What is the relationship between the master process and the child > processes? Daemon's child processes report status/info about it's subprocesses to the daemon once these finish. When they do they also exit, leaving the daemon the only running process. Until it's starts new processes. Daemons subprocesses are alive until they reported what they needed. > > Would it be acceptable for the child processes to be restarted when > the master process is restarted? No. Child processes are independent tasks, that should have finish on their own. > > If not, does the replacement process have a relationship with those > processes? > > If not, how is the administrator expected to operate on the > subordinate processes, if they are left running when the master > process is restarted? Administrator should not much care about those as they are user tasks/jobs and users on the other hand are interested just in their results. Having the daemon up means that this machine can start more tasks (if has available resources). Also administrator can see those since there is actually one real MASTER daemon that makes scheduling and other decisions and tells the what I called master daemon until now, you go ahead and start this task and gets some notifications as well, so anything goes wrong it will be detected.
I believe starting these processes is separate contract is exactly what I want. Unless you have a better solution? Is there any significant overhead for a short running process (0,3-2sec) to be started as a new contract? Many thanks, Lubos. > > Dave >