From: Willy Tarreau <w@1wt.eu>
To: Angelo Borsotti <angelo.borsotti@gmail.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: processes/threads monitor
Date: Sun, 1 Feb 2009 07:50:20 +0100 [thread overview]
Message-ID: <20090201065020.GN5038@1wt.eu> (raw)
In-Reply-To: <541298b90901311357o593a4339t46a44e8933bb1a6b@mail.gmail.com>
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
prev parent reply other threads:[~2009-02-01 6:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-01-31 21:57 Angelo Borsotti
2009-02-01 3:14 ` Valdis.Kletnieks
2009-02-01 6:50 ` Willy Tarreau [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20090201065020.GN5038@1wt.eu \
--to=w@1wt.eu \
--cc=angelo.borsotti@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®