Skip to main content

Signal blocking under Linux & OS X

Project description

Provides access to sigprocmask(2) and friends and convenience wrappers to python application developers wanting to SIG_BLOCK and SIG_UNBLOCK signals in critical sections of their code.

Most common usage

from signal import SIGINT, SIGTERM
from pysigset import suspended_signals

with suspended_signals(SIGINT, SIGTERM):
    # Signals are blocked here..
# Any pending signal is fired now..

Also available

    int sigaddset(sigset_t *set, int signum)

    int sigdelset(sigset_t *set, int signum)

    int sigemptyset(sigset_t *set)

    int sigfillset(sigset_t *set)

    int sigismember(const sigset_t *set, int signum)

    int sigpending(sigset_t *set)

    int sigprocmask(int how, const sigset_t *set, sigset_t *oldset)

    int sigsuspend(const sigset_t *mask)

Similar tools

python-signalfd provides access to sigprocmask and signalfd. Its advantage is access to signalfd. Its disadvantage is a compilation requirement.

pysigset has a pythonic interface and requires only ctypes access to or libSystem.B.dylib.


2015-09-22: 0.3.2

  • Python 3 compatibility (thanks Kevin Pouget).
  • Update version, update trove classifiers; adding Python 3, moving to Production/Stable.

2015-05-23: 0.2.2

  • Fix so we can install using again.

2013-07-30: 0.2.1

  • Fix so the RST is displayed on PyPI.

2013-07-30: 0.2

  • Add support for OS X / Darwin (thanks Dan Sully (dsully))
  • Add support for easy uploading to PyPI.

2013-04-15: 0.1

  • Initial release.

Project details

Download files

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

Files for pysigset, version 0.3.2
Filename, size File type Python version Upload date Hashes
Filename, size pysigset-0.3.2.tar.gz (4.6 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page