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 hashes)

Uploaded Source

Built Distribution

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

Uploaded Python 3

Supported by

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