If one creates a python script like this:
#!/usr/bin/python
import signal import time import sys import tempfile
def term_handler(signum, frame): time.sleep(15) sys.exit(0)
signal.signal(signal.SIGTERM, term_handler)
t=tempfile.TemporaryFile(mode='w')
while time.sleep(3600): pass
And runs it with a job file like this (sudo start test after creating the file below)
# /etc/init/test.conf stop on runlevel [016]
kill timeout 30
exec /path/to/test.py
With the current initscripts version, one will get orphaned inodes because the deleted tempfile was left open on reboot.
With the new version just uploaded (2.87dsf-4ubuntu25) the system should boot cleanly as the partially stopped process will have been killed off.
If one creates a python script like this:
#!/usr/bin/python
import signal
import time
import sys
import tempfile
def term_handler( signum, frame):
time.sleep( 15)
sys.exit(0)
signal. signal( signal. SIGTERM, term_handler)
t=tempfile. TemporaryFile( mode='w' )
while time.sleep(3600):
pass
And runs it with a job file like this (sudo start test after creating the file below)
# /etc/init/test.conf
stop on runlevel [016]
kill timeout 30
exec /path/to/test.py
With the current initscripts version, one will get orphaned inodes because the deleted tempfile was left open on reboot.
With the new version just uploaded (2.87dsf-4ubuntu25) the system should boot cleanly as the partially stopped process will have been killed off.