This Page

The quantum.agent.linux.daemon Module

class quantum.agent.linux.daemon.Daemon(pidfile, stdin='/dev/null', stdout='/dev/null', stderr='/dev/null', procname='python', uuid=None, root_helper='sudo')

Bases: object

A generic daemon class.

Usage: subclass the Daemon class and override the run() method

daemonize()

Daemonize process by doing Stevens double fork.

delete_pid()
run()

Override this method when subclassing Daemon.

start() will call this method after the process has daemonized.

start()

Start the daemon

class quantum.agent.linux.daemon.Pidfile(pidfile, procname, uuid=None, root_helper='sudo')

Bases: object

is_running()
read()
unlock()
write(pid)