Re: Daemontool-izing MySQL
Dmitry Volkoff <[email protected]>
| Newsgroups | gmane.comp.djb.syslog |
|---|---|
| Message-ID | <20030819220509.GA8284@server1> |
On Tue, Aug 19, 2003 at 08:23:43PM +0200, Clemens Fischer wrote:
> what's the story with `watchpid'? i can't seem to find copies of it,
> or it moved or whatever?
I don't know. I use 2 years old tarball downloaded somewhere.
> > killall -9 mysqld >& /dev/null
>
> isn't this a little heavy? what do you use the supervisor for if you
> need a statement like this?
I use only one running copy of mysqld, so I want to make sure no other
processes are running when I start mysqld. Normal supervise cannot kill
mysqld. This is why watchpid is needed. And if it fails somehow, you get
mysqld processes out of control.
> > envuidgid mysql envdir ./env sh -c '
> > ...
> > ' &
>
> why do you background the main job in a run script??
Because mysqld cannot be supervised on Linux right way.
I need to start watchpid after launching mysqld.
> > exec /usr/local/bin/watchpid `cat $pidfile`
> > killall -9 mysqld
>
> this final killall is never reached!
My mistake. I thought about failing exec.
--
DV