I have a thumbnail generator that launches multiple processes and the correct way to shut it down is to send kill -HUP to the parent process. To automate I had to write a pid file from python, it was a piece of cake
def writePidFile():
pid = str(os.getpid())
f = open('thumbnail_rabbit_consumer.pid', 'w')
f.write(pid)
f.close()
Comments
Post a Comment