I have a server with supervisor which runs two programs. Let's call them Program A and Program B. When the server gets shutdown. Program A's execution is terminated before Program B, which results in errors before the shutdown is completed. Is there a way using Supervisor to ensure that Program A will never be stopped before Program B is? It would actually not matter if Program A was not getting the SIGTERM so that it could ignore it all together (and keep running until after Program B has been shut down.)
Asked
Active
Viewed 371 times
1

Martijn Pieters
- 1,048,767
- 296
- 4,058
- 3,343

Loic Duros
- 5,472
- 10
- 43
- 56
-
1launch ur program using rc scripts to control the order of stop/start or else handle SIGTERM signal in process A and kill process B from process A. – Sasi V May 16 '14 at 14:31
1 Answers
1
See supervisord doc about parameter setting up priority
The doc states:
priority: The relative priority of the program in the start and shutdown ordering. Lower priorities indicate programs that start first and shut down last at startup and when aggregate commands are used in various clients (e.g. “start all”/”stop all”). Higher priorities indicate programs that start last and shut down first.
Default: 999
Required: No.
Introduced: 3.0

Jan Vlcinsky
- 42,725
- 12
- 101
- 98