我正在使用supervisord监视一些java进程。我用supervisord观察到的事情是,如果主要的supervisord进程由于某种原因而死,那么子进程(java进程的parentid是supervisord主进程id,只要supervisord正在运行)继续运行。在监督中是否有条款规定,如果主要过程死亡,其所有子过程也会死亡。
java进程的conf文件
command=/apps/shared/jdk1.7.0_55/bin/java -jar /apps/sra-services/artifactory-event-reg-api/artifactory-event-reg-api.jar --application.decryptionKey=dev --spring.profiles.active=dev
user=udsraalm
autostart=true
autorestart=true
startsecs=10
startretries=3
stdout_logfile=/apps/sra-services/artifactory-event-reg-api-logs/artifactory-event-reg-api-stdout.log
stderr_logfile=/apps/sra-services/artifactory-event-reg-api-logs/artifactory-event-reg-api-stderr.log
ps -ef | grep supervisord
udsraalm 26631 1 0 07:16 ? 00:00:00 /users/udsraalm/usr/local/bin/python2.7 /users/udsraalm/usr/local/bin/supervisord
ps -ef | grep artifactory
udsraalm 26635 26631 3 07:16 ? 00:00:20 /apps/shared/jdk1.7.0_55/bin/java -jar /apps/sra-services/artifactory-event-reg-api/artifactory-event-reg-api.jar --application.decryptionKey=dev --spring.profiles.active=dev
杀死主管后
ps -ef | grep artifactory
udsraalm 26635 1 3 07:16 ? 00:00:20 /apps/shared/jdk1.7.0_55/bin/java -jar /apps/sra-services/artifactory-event-reg-api/artifactory-event-reg-api.jar --application.decryptionKey=dev --spring.profiles.active=dev
看到子进程没有被杀死