upstart child process not terminating
I have a upstart script under RHEL 6.4 to start and stop a Java process. When I stop Java process, upstart stops parent but not stopping child process (Java process). Parent spawning shell script that starts Java process. Child is started as a different user than parent.I want child process to be stopped along with parent. Please help.
Upstart script:
$ cat /etc/init/
start on runlevel [35]
stop on runlevel [!$RUNLEVEL]
respawn
instance $PROC
exec /home/rootnpc/
$
when main process running:
$ ps -ef | grep spice17_1
root 25754 1 0 08:44 ? 00:00:00 /bin/bash /home/rootnpc/
root 25758 25754 0 08:44 ? 00:00:00 su - npc -c /home/npc/
npc 25759 25758 2 08:44 ? 00:00:00 /bin/bash /home/npc/
npc 25823 25759 29 08:44 ? 00:00:01 java -DInstanceID=
when main process stopped (child PID changed to 1):
$ ps -ef | grep spice17_1
npc 25823 1 0 08:44 ? 00:00:01 java -DInstanceID=
Question information
- Language:
- English Edit question
- Status:
- Expired
- For:
- upstart Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply: