I've got a several services on Ubuntu which will start using 'upstart'. They are working as requested, but when I use 'stop/start/restart {myservice}' it will hang (but WILL do as requested).
I understand it has something to do with forking.
My services are python scripts, which will create new threads on startup. One script will create 1 new thread (and will continue running on the main as well), the second one will create 2 new threads and will continue running on the main as well and the third one will create no new threads.
All of them hang on the command.
All use the same code in /etc/init as follows:
description "my service"
version "1.0"
author "my name, 2013"
expect fork
start on runlevel [2345]
stop on runlevel [!2345]
respawn
chdir <to script dir>
exec /usr/bin/python ./scriptname/
what do you think might be the problem? Does 'fork' has anything to do with creating new threads?