[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <20090201065020.GN5038@1wt.eu>
Date: Sun, 1 Feb 2009 07:50:20 +0100
From: Willy Tarreau <w@....eu>
To: Angelo Borsotti <angelo.borsotti@...il.com>
Cc: linux-kernel@...r.kernel.org
Subject: Re: processes/threads monitor
On Sat, Jan 31, 2009 at 10:57:36PM +0100, Angelo Borsotti wrote:
(...)
> A much more efficient solution would be for the process monitor to be
> allowed to wait
> for the termination of any processes/threads belonging to a specified list.
> Note that this would mean waiting for one among several events to occur.
>
> Are there any solution to this?
This is called a launcher or wrapper. Your process just has to fork/exec
the process to monitor, and it receives a sigchild when that one dies.
One well-known process does that all the time, it's called init :-)
But this does not save you from checking that your processes are properly
working. A process which just dies is the trivial case. Most unhandled
errors are from stuck processes, which need to be killed and respawned.
So if you have to check that a process is working correctly and you can
kill it, it's often easy to restart it, and you don't need your wrapper.
You're back to the script you found inefficient ;-)
Cheers,
Willy
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists