pidproxy Program
Some processes (like mysqld) ignore signals sent to theactual process which is spawned by supervisord. Instead, a“special” thread/process is created by these kinds of programs whichis responsible for handling signals. This is problematic becausesupervisord can only kill a process which it createsitself. If a process created by supervisord creates itsown child processes, supervisord cannot kill them.
Fortunately, these types of programs typically write a “pidfile” whichcontains the “special” process’ PID, and is meant to be read and usedin order to kill the process. As a workaround for this case, aspecial pidproxy program can handle startup of these kindsof processes. The pidproxy program is a small shim thatstarts a process, and upon the receipt of a signal, sends the signalto the pid provided in a pidfile. A sample configuration programentry for a pidproxy-enabled program is provided below.
- [program:mysql]
- command=/path/to/pidproxy /path/to/pidfile /path/to/mysqld_safe
The pidproxy program is put into your configuration’s$BINDIR when supervisor is installed (it is a “console script”).