CFFI bindings for signalfd.
Project description
CFFI bindings for signalfd. Interface is mostly the same as https://pypi.python.org/pypi/python-signalfd
Free software: BSD license
Installation
pip install signalfd
Usage
import signalfd
fd = signalfd.signalfd(-1, [signal.SIGUSR1], signalfd.SFD_CLOEXEC)
try:
signalfd.sigprocmask(signalfd.SIG_BLOCK, [signal.SIGUSR1])
while True:
si = signalfd.read_siginfo(fd)
print(si.ssi_signo)
finally:
os.close(fd)
Documentation
Development
To run the all tests run:
tox
Changelog
1.0.0 (2024-11-02)
Fixed build issue caused by incorrect sigset_t size calculation.
Updated various project boilerplate.
Dropped support for EOL Python 3.8.
0.4.0 (2015-08-25)
Corrected return value for sigprocmask.
0.3.0 (2015-08-24)
Corrected error handling in signalfd and sigprocmask wrappers.
0.2.0 (2015-08-24)
Changed read_siginfo so it raises IOError in case is used with a file object and .readinto() would return None (not enough data available).
0.1.0 (2015-08-23)
First release on PyPI.
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
File details
Details for the file signalfd-1.0.0.tar.gz.
File metadata
- Download URL: signalfd-1.0.0.tar.gz
- Upload date:
- Size: 17.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e628098bcad8cdd74c6b4f41695bccbde69989c989378b7a308d92328aeccbb2
|
|
| MD5 |
a1c74cee4f9ac3951520bf76e3f7a1a2
|
|
| BLAKE2b-256 |
bdea7acb77768db7c8caea58946328e1952aa274f95c7f62e55304fd669f8bd8
|