I am currently learning upstart by playing around. I think I have understood the principle now, but I am having difficulties with the "kill timeout" stanza in upstart jobs.
For example, I have the following job (filename /etc/init/test.conf):
description "test"
start on test
console owner
kill timeout 5
task
exec /root/test
The file /root/test is a small shell script which runs forever:
while true; do o=1; done;
When doing "initctl start test", the job "test" is run and calls the script "/root/test". I can verify that by doing "initctl status test" which shows the job as running as well as by doing "ps -Alf".
Now, the "kill timeout 5" stanza should cause the job to be killed after 5 seconds. But instead, the job seems to run forever.
I would like to know if I am using and understanding the kill timeout stanza in the right way. It is an essential feature for me.
This is on Natty 11.04, but I think the question applies to other versions as well.
Thank you very much,
Binarus