Skip to main content

A pure Python wrapper of signalfd(2)

Project description

pysignalfd

A pure Python wrapper of signalfd(2).

Installation

pip install pysigalfd

Usage

import signal
import pysignalfd


sigs = [signal.SIGTERM, signal.SIGHUP]
signal.pthread_sigmask(signal.SIG_BLOCK, sigs)
fd = pysignalfd.signalfd(sigs, CLOEXEC=True, NONBLOCK=False)
for signum in pysignalfd.parse_siginfo(fd):
    print(signum)

Similar Tools

  1. python-signalfd
  2. signalfd

Both module relies on "Python.h" to extend, by which there is a concern that installation might fail on the disparate Linux environments.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pysignalfd-0.0.1.tar.gz (3.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pysignalfd-0.0.1-py3-none-any.whl (15.6 kB view details)

Uploaded Python 3

File details

Details for the file pysignalfd-0.0.1.tar.gz.

File metadata

  • Download URL: pysignalfd-0.0.1.tar.gz
  • Upload date:
  • Size: 3.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for pysignalfd-0.0.1.tar.gz
Algorithm Hash digest
SHA256 3dca14305eb2d7e71e1935cd9d7d5b28341e9fb25da235b09bd42c56e6179514
MD5 5a53f5f155c288b4a17167ab68105918
BLAKE2b-256 238f27f598a38f8fbd9c0feabefefce1f32e223e0e1687637cbf6babe6a33abe

See more details on using hashes here.

File details

Details for the file pysignalfd-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pysignalfd-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/51.3.3 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for pysignalfd-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 334cc0e54daa18ca8ae685db7c64f73a79bd1c9b5e926dcc8f9a8017461b0884
MD5 95f85a7bb8d2d77028a5cf1490bb2ae3
BLAKE2b-256 da36463a6e1e826d09f830173d69c05a34f0e1e7d5a5b3a169c279b5e97a9295

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page