Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(21)  |  Call(12)  |  Derive(0)  |  Import(9)
Manage a PID file. If a specific name is provided
it and '"%s.oldpid" % name' will be used. Otherwise
we create a temp file using os.mkstemp.

src/g/a/gaffer-0.5.2/gaffer/lookupd/main.py   gaffer(Download)
from .. import __version__
from ..docopt import docopt
from ..pidfile import Pidfile
from ..sig_handler import BaseSigHandler
from ..util import bind_sockets, daemonize, setproctitle_
    pidfile = None
    if args["--pidfile"]:
        pidfile = Pidfile(args["--pidfile"])
 
        try:

src/g/a/gaffer-0.5.2/gaffer/gafferd/main.py   gaffer(Download)
from ..error import ProcessError
from ..manager import Manager
from ..pidfile import Pidfile
from ..process import ProcessConfig
from ..sig_handler import SigHandler
        pidfile = None
        if self.cfg.pidfile:
            pidfile = Pidfile(self.cfg.pidfile)
            try:
                pidfile.create(os.getpid())

src/t/p/tproxy-0.5.4/tproxy/arbiter.py   tproxy(Download)
from . import __version__
from . import util
from .pidfile import Pidfile
from .proxy import tcp_listener
from .worker import Worker
 
        if self.cfg.pidfile is not None:
            self.pidfile = Pidfile(self.cfg.pidfile)
            self.pidfile.create(self.pid)
 
        # create new pidfile
        if self.cfg.pidfile is not None:
            self.pidfile = Pidfile(self.cfg.pidfile)
            self.pidfile.create(self.pid)
 

src/g/a/gaffer-HEAD/gaffer/lookupd/main.py   gaffer(Download)
from .. import __version__
from ..docopt import docopt
from ..pidfile import Pidfile
from ..sig_handler import BaseSigHandler
from ..util import bind_sockets, daemonize, setproctitle_
    pidfile = None
    if args["--pidfile"]:
        pidfile = Pidfile(args["--pidfile"])
 
        try:

src/g/a/gaffer-HEAD/gaffer/gafferd/main.py   gaffer(Download)
from ..error import ProcessError
from ..manager import Manager
from ..pidfile import Pidfile
from ..process import ProcessConfig
from ..sig_handler import SigHandler
        pidfile = None
        if self.cfg.pidfile:
            pidfile = Pidfile(self.cfg.pidfile)
            try:
                pidfile.create(os.getpid())

src/t/p/tproxy-HEAD/tproxy/arbiter.py   tproxy(Download)
from . import __version__
from . import util
from .pidfile import Pidfile
from .proxy import tcp_listener
from .worker import Worker
 
        if self.cfg.pidfile is not None:
            self.pidfile = Pidfile(self.cfg.pidfile)
            self.pidfile.create(self.pid)
 
        # create new pidfile
        if self.cfg.pidfile is not None:
            self.pidfile = Pidfile(self.cfg.pidfile)
            self.pidfile.create(self.pid)
 

src/a/i/Airplayer-HEAD/airplayer/airplayer.py   Airplayer(Download)
import settings
import utils
from pidfile import Pidfile
 
class Application(object):
 
            pid = os.getpid()
            self._pidfile = Pidfile(self._opts.pidfile)
            self._pidfile.create(pid)